[Fuego] [PATCH 1/1] Dockerfile: install-debian.sh: upgrade to Debian 9 (Stretch)

Fathi Boudra fathi.boudra at linaro.org
Mon Apr 8 14:46:17 UTC 2019


* Use debian:stretch-slim as the base image. The only difference with the
  regular debian:stretch image is the lack of documentation/manpages,
  hence smaller and more appropriate for containers usage.
* Create /usr/share/man/man1 to make update-alternatives happy during
  packages installation.
* Update repositories URLs to use Debian Stretch.
* Replace openjdk-7-jdk by default-jdk package. Stretch doesn't have
  OpenJDK 7 anymore and the default is OpenJDK 8. Note: OpenJDK 8 is
  required for Jenkins >= 2.60.1 released in June 2017.

Signed-off-by: Fathi Boudra <fathi.boudra at linaro.org>
---
 Dockerfile           | 9 +++++----
 Dockerfile.nojenkins | 7 ++++---
 install-debian.sh    | 6 +++---
 3 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index 8f43ab3..6f1e2b6 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -4,7 +4,7 @@
 # ==============================================================================
 # FIXTHIS: build this as an extension of the nonjenkins image
 
-FROM debian:jessie
+FROM debian:stretch-slim
 MAINTAINER tim.bird at sony.com
 
 # ==============================================================================
@@ -22,8 +22,8 @@ ENV https_proxy ${HTTP_PROXY}
 ARG DEBIAN_FRONTEND=noninteractive
 
 WORKDIR /
-RUN echo deb http://httpredir.debian.org/debian jessie main non-free > /etc/apt/sources.list
-RUN echo deb http://security.debian.org/debian-security jessie/updates main >> /etc/apt/sources.list
+RUN echo deb http://deb.debian.org/debian stretch main non-free > /etc/apt/sources.list
+RUN echo deb http://security.debian.org/debian-security stretch/updates main >> /etc/apt/sources.list
 RUN if [ -n "$HTTP_PROXY" ]; then echo 'Acquire::http::proxy "'$HTTP_PROXY'";' > /etc/apt/apt.conf.d/80proxy; fi
 
 # Fuego python dependencies
@@ -36,6 +36,7 @@ RUN if [ -n "$HTTP_PROXY" ]; then echo 'Acquire::http::proxy "'$HTTP_PROXY'";' >
 # - python-parsedatetime: ftc
 # - python-pip: to install filelock, flake8
 # - filelock: parser
+RUN mkdir -p /usr/share/man/man1
 RUN apt-get update && apt-get -yV install \
 	python-lxml python-simplejson python-yaml python-openpyxl \
 	python-requests python-reportlab python-parsedatetime \
@@ -100,7 +101,7 @@ ENV JENKINS_PORT=$JENKINS_PORT
 
 # Jenkins dependencies
 RUN apt-get update && apt-get -yV install \
-	openjdk-7-jdk daemon psmisc adduser procps unzip
+	default-jdk daemon psmisc adduser procps unzip
 RUN pip install python-jenkins==0.4.14
 
 RUN echo -e "JENKINS_PORT=$JENKINS_PORT" >> /etc/environment
diff --git a/Dockerfile.nojenkins b/Dockerfile.nojenkins
index 43e38b7..19af85c 100644
--- a/Dockerfile.nojenkins
+++ b/Dockerfile.nojenkins
@@ -15,7 +15,7 @@
 # docker# ftc run-test -b docker -t Functional.hello_world
 #   log_compare: pattern 'SUCCESS' found 1 times (expected greater or equal than 1)
 
-FROM debian:jessie
+FROM debian:stretch-slim
 MAINTAINER tim.bird at sony.com
 
 # ==============================================================================
@@ -33,8 +33,8 @@ ENV https_proxy ${HTTP_PROXY}
 ARG DEBIAN_FRONTEND=noninteractive
 
 WORKDIR /
-RUN echo deb http://httpredir.debian.org/debian jessie main non-free > /etc/apt/sources.list
-RUN echo deb http://security.debian.org/debian-security jessie/updates main >> /etc/apt/sources.list
+RUN echo deb http://deb.debian.org/debian stretch main non-free > /etc/apt/sources.list
+RUN echo deb http://security.debian.org/debian-security stretch/updates main >> /etc/apt/sources.list
 RUN if [ -n "$HTTP_PROXY" ]; then echo 'Acquire::http::proxy "'$HTTP_PROXY'";' > /etc/apt/apt.conf.d/80proxy; fi
 
 # Fuego python dependencies
@@ -47,6 +47,7 @@ RUN if [ -n "$HTTP_PROXY" ]; then echo 'Acquire::http::proxy "'$HTTP_PROXY'";' >
 # - python-parsedatetime: ftc
 # - python-pip: to install filelock, flake8
 # - filelock: parser
+RUN mkdir -p /usr/share/man/man1
 RUN apt-get update && apt-get -yV install \
 	python-lxml python-simplejson python-yaml python-openpyxl \
 	python-requests python-reportlab python-parsedatetime \
diff --git a/install-debian.sh b/install-debian.sh
index c059539..790c484 100755
--- a/install-debian.sh
+++ b/install-debian.sh
@@ -37,8 +37,8 @@ fi
 # ==============================================================================
 
 # netperf is in non-free
-echo deb http://httpredir.debian.org/debian jessie main non-free > /etc/apt/sources.list
-echo deb http://security.debian.org/debian-security jessie/updates main >> /etc/apt/sources.list
+echo deb http://deb.debian.org/debian stretch main non-free > /etc/apt/sources.list
+echo deb http://security.debian.org/debian-security stretch/updates main >> /etc/apt/sources.list
 
 apt-get update
 
@@ -98,7 +98,7 @@ if [ $nojenkins -eq 0 ]; then
 
 	# Jenkins dependencies
 	apt-get -yV install \
-		openjdk-7-jdk daemon psmisc adduser procps unzip
+		default-jdk daemon psmisc adduser procps unzip
 	pip install python-jenkins==0.4.14
 
 	echo -e "JENKINS_PORT=$JENKINS_PORT" >> /etc/environment
-- 
2.20.1



More information about the Fuego mailing list