Bug 1841: LTS Support
Updates base to Ubuntu 20.04
Updates python to 3.8
Updates pip dependencies to more recent versions
Adds apt cache to stage 2 dockerfile
Change stage 3 base image to Ubuntu 20.04 so we can use
python3.8
Fixes bug 1841
Change-Id: I442d0ecf09f033946bbbc3301fd8de54382a4195
Signed-off-by: beierlm <mark.beierl@canonical.com>
diff --git a/docker/LCM/Dockerfile b/docker/LCM/Dockerfile
index 7a5e376..8669369 100644
--- a/docker/LCM/Dockerfile
+++ b/docker/LCM/Dockerfile
@@ -16,19 +16,21 @@
########################################################################
-FROM ubuntu:18.04 as INSTALL
+FROM ubuntu:20.04 as INSTALL
RUN DEBIAN_FRONTEND=noninteractive apt-get --yes update && \
DEBIAN_FRONTEND=noninteractive apt-get --yes install \
- gcc=4:7.4.* \
- python3=3.6.* \
- python3-dev=3.6.* \
- python3-setuptools=39.0.* \
- curl=7.58.* \
- apt-transport-https=1.6.* \
+ gcc=4:9.3.* \
+ python3=3.8.* \
+ python3-dev=3.8.* \
+ python3-pip=20.0.2* \
+ python3-setuptools=45.2.* \
+ curl=7.68.*
+
+RUN DEBIAN_FRONTEND=noninteractive apt-get --yes install \
+ apt-transport-https=2.0.* \
gnupg2=2.2.* \
- openssh-client=1:7.* && \
- python3 -m easy_install pip==21.0.1 setuptools==51.0.0
+ openssh-client=1:8.*
RUN curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - \
&& echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | tee -a /etc/apt/sources.list.d/kubernetes.list \
@@ -63,16 +65,27 @@
-r /usr/lib/python3/dist-packages/osm_lcm/requirements.txt \
-r /usr/lib/python3/dist-packages/n2vc/requirements.txt
-FROM ubuntu:18.04
+#######################################################################################
+FROM ubuntu:20.04 as FINAL
+
+ARG APT_PROXY
+RUN if [ ! -z $APT_PROXY ] ; then \
+ echo "Acquire::http::Proxy \"$APT_PROXY\";" > /etc/apt/apt.conf.d/proxy.conf ;\
+ echo "Acquire::https::Proxy \"$APT_PROXY\";" >> /etc/apt/apt.conf.d/proxy.conf ;\
+ fi
RUN DEBIAN_FRONTEND=noninteractive apt-get --yes update && \
DEBIAN_FRONTEND=noninteractive apt-get --yes install \
- python3-minimal=3.6.* \
+ python3-minimal=3.8.* \
+ && rm -rf /var/lib/apt/lists/*
+
+RUN DEBIAN_FRONTEND=noninteractive apt-get --yes update && \
+ DEBIAN_FRONTEND=noninteractive apt-get --yes install \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY --from=INSTALL /usr/lib/python3/dist-packages /usr/lib/python3/dist-packages
-COPY --from=INSTALL /usr/local/lib/python3.6/dist-packages /usr/local/lib/python3.6/dist-packages
+COPY --from=INSTALL /usr/local/lib/python3.8/dist-packages /usr/local/lib/python3.8/dist-packages
COPY --from=INSTALL /usr/bin/kubectl /usr/bin/kubectl
COPY --from=INSTALL /usr/local/bin/helm /usr/local/bin/helm
diff --git a/docker/MON/Dockerfile b/docker/MON/Dockerfile
index 719d633..0046df8 100644
--- a/docker/MON/Dockerfile
+++ b/docker/MON/Dockerfile
@@ -24,13 +24,15 @@
RUN DEBIAN_FRONTEND=noninteractive apt-get --yes update && \
DEBIAN_FRONTEND=noninteractive apt-get --yes install \
- curl=7.68.* \
gcc=4:9.3.* \
python3=3.8.* \
- python3-setuptools=45.2.* \
python3-dev=3.8.* \
- openssh-client=1:8.* && \
- python3 -m easy_install pip==21.0.1 setuptools==51.0.0
+ python3-pip=20.0.2* \
+ python3-setuptools=45.2.* \
+ curl=7.68.*
+
+RUN DEBIAN_FRONTEND=noninteractive apt-get --yes install \
+ openssh-client=1:8.*
ARG PYTHON3_OSM_COMMON_URL
ARG PYTHON3_OSM_MON_URL
@@ -50,11 +52,22 @@
-r /usr/lib/python3/dist-packages/osm_common/requirements.txt \
-r /usr/lib/python3/dist-packages/osm_mon/requirements.txt
+#######################################################################################
FROM ubuntu:20.04 as FINAL
+ARG APT_PROXY
+RUN if [ ! -z $APT_PROXY ] ; then \
+ echo "Acquire::http::Proxy \"$APT_PROXY\";" > /etc/apt/apt.conf.d/proxy.conf ;\
+ echo "Acquire::https::Proxy \"$APT_PROXY\";" >> /etc/apt/apt.conf.d/proxy.conf ;\
+ fi
+
RUN DEBIAN_FRONTEND=noninteractive apt-get --yes update && \
DEBIAN_FRONTEND=noninteractive apt-get --yes install \
python3-minimal=3.8.* \
+ && rm -rf /var/lib/apt/lists/*
+
+RUN DEBIAN_FRONTEND=noninteractive apt-get --yes update && \
+ DEBIAN_FRONTEND=noninteractive apt-get --yes install \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
diff --git a/docker/NBI/Dockerfile b/docker/NBI/Dockerfile
index 4ac2a49..49399fb 100644
--- a/docker/NBI/Dockerfile
+++ b/docker/NBI/Dockerfile
@@ -16,16 +16,16 @@
########################################################################
-FROM ubuntu:18.04 as INSTALL
+FROM ubuntu:20.04 as INSTALL
RUN DEBIAN_FRONTEND=noninteractive apt-get --yes update && \
DEBIAN_FRONTEND=noninteractive apt-get --yes install \
- gcc=4:7.4.* \
- python3=3.6.* \
- python3-dev=3.6.* \
- python3-setuptools=39.0.* \
- curl=7.58.* && \
- python3 -m easy_install pip==21.0.1 setuptools==51.0.0
+ gcc=4:9.3.* \
+ python3=3.8.* \
+ python3-dev=3.8.* \
+ python3-pip=20.0.2* \
+ python3-setuptools=45.2.* \
+ curl=7.68.*
ARG PYTHON3_OSM_COMMON_URL
ARG PYTHON3_OSM_IM_URL
@@ -45,14 +45,22 @@
-r /usr/lib/python3/dist-packages/osm_im/requirements.txt \
-r /usr/lib/python3/dist-packages/osm_nbi/requirements.txt
-FROM ubuntu:18.04 as FINAL
+#######################################################################################
+FROM ubuntu:20.04 as FINAL
+
+ARG APT_PROXY
+RUN if [ ! -z $APT_PROXY ] ; then \
+ echo "Acquire::http::Proxy \"$APT_PROXY\";" > /etc/apt/apt.conf.d/proxy.conf ;\
+ echo "Acquire::https::Proxy \"$APT_PROXY\";" >> /etc/apt/apt.conf.d/proxy.conf ;\
+ fi
RUN DEBIAN_FRONTEND=noninteractive apt-get --yes update && \
- DEBIAN_FRONTEND=noninteractive apt-get --yes install python3-minimal=3.6.* \
+ DEBIAN_FRONTEND=noninteractive apt-get --yes install \
+ python3-minimal=3.8.* \
&& rm -rf /var/lib/apt/lists/*
COPY --from=INSTALL /usr/lib/python3/dist-packages /usr/lib/python3/dist-packages
-COPY --from=INSTALL /usr/local/lib/python3.6/dist-packages /usr/local/lib/python3.6/dist-packages
+COPY --from=INSTALL /usr/local/lib/python3.8/dist-packages /usr/local/lib/python3.8/dist-packages
RUN mkdir -p /app/storage/kafka && mkdir -p /app/log
diff --git a/docker/NG-UI/Dockerfile b/docker/NG-UI/Dockerfile
index 53ec2a9..29b1ae4 100644
--- a/docker/NG-UI/Dockerfile
+++ b/docker/NG-UI/Dockerfile
@@ -13,22 +13,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-FROM ubuntu:18.04 AS BUILD
+FROM ubuntu:20.04 as INSTALL
RUN DEBIAN_FRONTEND=noninteractive apt-get --yes update && \
DEBIAN_FRONTEND=noninteractive apt-get --yes install \
- apt-transport-https=1.6.* \
- curl=7.58.* \
+ apt-transport-https=2.0.* \
+ curl=7.68.* \
gnupg2=2.2.* \
- nginx=1.14.* \
- software-properties-common=0.96.* \
+ nginx=1.18.* \
+ software-properties-common=0.99.* \
xz-utils=5.2.*
RUN curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
- echo "deb https://deb.nodesource.com/node_10.x xenial main" | tee -a /etc/apt/sources.list.d/nodesource.list && \
- apt-get update && \
- apt-get install -y nodejs=10.24.* \
- && rm -rf /var/lib/apt/lists/*
+ echo "deb https://deb.nodesource.com/node_10.x focal main" | tee -a /etc/apt/sources.list.d/nodesource.list && \
+ DEBIAN_FRONTEND=noninteractive apt-get update && \
+ DEBIAN_FRONTEND=noninteractive apt-get install -y nodejs=10.24.*
ARG OSM_NGUI_URL
@@ -41,21 +40,28 @@
# Building app.
RUN npm run build
-FROM ubuntu:18.04 AS FINAL
+#######################################################################################
+FROM ubuntu:20.04 AS FINAL
+
+ARG APT_PROXY
+RUN if [ ! -z $APT_PROXY ] ; then \
+ echo "Acquire::http::Proxy \"$APT_PROXY\";" > /etc/apt/apt.conf.d/proxy.conf ;\
+ echo "Acquire::https::Proxy \"$APT_PROXY\";" >> /etc/apt/apt.conf.d/proxy.conf ;\
+ fi
RUN DEBIAN_FRONTEND=noninteractive apt-get --yes update && \
DEBIAN_FRONTEND=noninteractive apt-get --yes install \
- nginx=1.14.* && \
+ nginx=1.18.* && \
rm -rf /var/lib/apt/lists/*
# Removing the Nginx default page.
RUN rm -rf /usr/share/nginx/html/*
# Copying Nginx configuration
-COPY --from=BUILD /usr/share/osm-ngui/nginx/nginx.conf /etc/nginx/sites-available/default
+COPY --from=INSTALL /usr/share/osm-ngui/nginx/nginx.conf /etc/nginx/sites-available/default
# Copying angular build to Nginx default page.
-COPY --from=BUILD /usr/share/osm-ngui/dist/osm /usr/share/nginx/html
+COPY --from=INSTALL /usr/share/osm-ngui/dist/osm /usr/share/nginx/html
EXPOSE 80
diff --git a/docker/PLA/Dockerfile b/docker/PLA/Dockerfile
index 8d4350b..36865e5 100644
--- a/docker/PLA/Dockerfile
+++ b/docker/PLA/Dockerfile
@@ -13,16 +13,28 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-FROM ubuntu:18.04 as INSTALL
+FROM ubuntu:20.04 as INSTALL
+
+ARG APT_PROXY
+RUN if [ ! -z $APT_PROXY ] ; then \
+ echo "Acquire::http::Proxy \"$APT_PROXY\";" > /etc/apt/apt.conf.d/proxy.conf ;\
+ echo "Acquire::https::Proxy \"$APT_PROXY\";" >> /etc/apt/apt.conf.d/proxy.conf ;\
+ fi
+
+ARG APT_PROXY
+RUN if [ ! -z $APT_PROXY ] ; then \
+ echo "Acquire::http::Proxy \"$APT_PROXY\";" > /etc/apt/apt.conf.d/proxy.conf ;\
+ echo "Acquire::https::Proxy \"$APT_PROXY\";" >> /etc/apt/apt.conf.d/proxy.conf ;\
+ fi
RUN DEBIAN_FRONTEND=noninteractive apt-get --yes update && \
DEBIAN_FRONTEND=noninteractive apt-get --yes install \
- gcc=4:7.4.* \
- python3=3.6.* \
- python3-dev=3.6.* \
- python3-setuptools=39.0.* \
- curl=7.58.* && \
- python3 -m easy_install pip==21.0.1 setuptools==51.0.0
+ gcc=4:9.3.* \
+ python3=3.8.* \
+ python3-dev=3.8.* \
+ python3-pip=20.0.2* \
+ python3-setuptools=45.2.* \
+ curl=7.68.*
ARG PYTHON3_OSM_COMMON_URL
ARG PYTHON3_OSM_PLA_URL
@@ -42,15 +54,24 @@
RUN tar -zxf /minizinc.tgz && \
mv /MiniZincIDE-2.4.2-bundle-linux /minizinc
-FROM ubuntu:18.04
-LABEL authors="Lars-Göran Magnusson"
+#######################################################################################
+FROM ubuntu:20.04 as FINAL
+
+ARG APT_PROXY
+RUN if [ ! -z $APT_PROXY ] ; then \
+ echo "Acquire::http::Proxy \"$APT_PROXY\";" > /etc/apt/apt.conf.d/proxy.conf ;\
+ echo "Acquire::https::Proxy \"$APT_PROXY\";" >> /etc/apt/apt.conf.d/proxy.conf ;\
+ fi
RUN DEBIAN_FRONTEND=noninteractive apt-get --yes update && \
- DEBIAN_FRONTEND=noninteractive apt-get --yes install python3-minimal=3.6.* \
+ DEBIAN_FRONTEND=noninteractive apt-get --yes install \
+ python3-minimal=3.8.* \
&& rm -rf /var/lib/apt/lists/*
+LABEL authors="Lars-Göran Magnusson"
+
COPY --from=INSTALL /usr/lib/python3/dist-packages /usr/lib/python3/dist-packages
-COPY --from=INSTALL /usr/local/lib/python3.6/dist-packages /usr/local/lib/python3.6/dist-packages
+COPY --from=INSTALL /usr/local/lib/python3.8/dist-packages /usr/local/lib/python3.8/dist-packages
COPY --from=INSTALL /usr/bin/osm* /usr/bin/
COPY --from=INSTALL /minizinc /minizinc
diff --git a/docker/POL/Dockerfile b/docker/POL/Dockerfile
index 3e708b7..a88ecae 100644
--- a/docker/POL/Dockerfile
+++ b/docker/POL/Dockerfile
@@ -24,13 +24,15 @@
RUN DEBIAN_FRONTEND=noninteractive apt-get --yes update && \
DEBIAN_FRONTEND=noninteractive apt-get --yes install \
- curl=7.68.* \
gcc=4:9.3.* \
python3=3.8.* \
- python3-setuptools=45.2.* \
python3-dev=3.8.* \
- mysql-client-core-8.0=8.0.* && \
- python3 -m easy_install pip==21.0.1 setuptools==51.0.0
+ python3-pip=20.0.2* \
+ python3-setuptools=45.2.* \
+ curl=7.68.*
+
+RUN DEBIAN_FRONTEND=noninteractive apt-get --yes install \
+ mysql-client-core-8.0=8.0.*
ARG PYTHON3_OSM_COMMON_URL
ARG PYTHON3_OSM_POLICY_MODULE_URL
@@ -45,10 +47,18 @@
-r /usr/lib/python3/dist-packages/osm_common/requirements.txt \
-r /usr/lib/python3/dist-packages/osm_policy_module/requirements.txt
+#######################################################################################
FROM ubuntu:20.04 as FINAL
+ARG APT_PROXY
+RUN if [ ! -z $APT_PROXY ] ; then \
+ echo "Acquire::http::Proxy \"$APT_PROXY\";" > /etc/apt/apt.conf.d/proxy.conf ;\
+ echo "Acquire::https::Proxy \"$APT_PROXY\";" >> /etc/apt/apt.conf.d/proxy.conf ;\
+ fi
+
RUN DEBIAN_FRONTEND=noninteractive apt-get --yes update && \
- DEBIAN_FRONTEND=noninteractive apt-get --yes install python3-minimal=3.8.* \
+ DEBIAN_FRONTEND=noninteractive apt-get --yes install \
+ python3-minimal=3.8.* \
&& rm -rf /var/lib/apt/lists/*
COPY --from=INSTALL /usr/lib/python3/dist-packages /usr/lib/python3/dist-packages
diff --git a/docker/RO/Dockerfile b/docker/RO/Dockerfile
index 82a99b9..cf6d714 100644
--- a/docker/RO/Dockerfile
+++ b/docker/RO/Dockerfile
@@ -16,18 +16,21 @@
########################################################################
-FROM ubuntu:18.04 as INSTALL
+FROM ubuntu:20.04 as INSTALL
RUN DEBIAN_FRONTEND=noninteractive apt-get --yes update && \
DEBIAN_FRONTEND=noninteractive apt-get --yes install \
- gcc=4:7.4.* \
- python3=3.6.* \
- python3-dev=3.6.* \
- python3-setuptools=39.0.* \
- curl=7.58.* \
+ gcc=4:9.3.* \
+ python3=3.8.* \
+ python3-dev=3.8.* \
+ python3-pip=20.0.2* \
+ python3-setuptools=45.2.* \
+ curl=7.68.*
+
+RUN DEBIAN_FRONTEND=noninteractive apt-get --yes update && \
+ DEBIAN_FRONTEND=noninteractive apt-get --yes install \
genisoimage=9:1.1.* \
- netbase=5.* && \
- python3 -m easy_install pip==21.0.1 setuptools==51.0.0
+ netbase=6.*
ARG PYTHON3_OSM_COMMON_URL
ARG PYTHON3_OSM_NG_RO_URL
@@ -74,14 +77,22 @@
-r /usr/lib/python3/dist-packages/osm_common/requirements.txt \
-r /usr/lib/python3/dist-packages/osm_ng_ro/requirements.txt
-FROM ubuntu:18.04
+#######################################################################################
+FROM ubuntu:20.04 as FINAL
+
+ARG APT_PROXY
+RUN if [ ! -z $APT_PROXY ] ; then \
+ echo "Acquire::http::Proxy \"$APT_PROXY\";" > /etc/apt/apt.conf.d/proxy.conf ;\
+ echo "Acquire::https::Proxy \"$APT_PROXY\";" >> /etc/apt/apt.conf.d/proxy.conf ;\
+ fi
RUN DEBIAN_FRONTEND=noninteractive apt-get --yes update && \
- DEBIAN_FRONTEND=noninteractive apt-get --yes install python3-minimal=3.6.* \
+ DEBIAN_FRONTEND=noninteractive apt-get --yes install \
+ python3-minimal=3.8.* \
&& rm -rf /var/lib/apt/lists/*
COPY --from=INSTALL /usr/lib/python3/dist-packages /usr/lib/python3/dist-packages
-COPY --from=INSTALL /usr/local/lib/python3.6/dist-packages /usr/local/lib/python3.6/dist-packages
+COPY --from=INSTALL /usr/local/lib/python3.8/dist-packages /usr/local/lib/python3.8/dist-packages
COPY --from=INSTALL /usr/bin/genisoimage /usr/bin/genisoimage
COPY --from=INSTALL /etc/protocols /etc/protocols
diff --git a/docker/osmclient/Dockerfile b/docker/osmclient/Dockerfile
index 299990a..e5e1f30 100644
--- a/docker/osmclient/Dockerfile
+++ b/docker/osmclient/Dockerfile
@@ -15,18 +15,26 @@
# limitations under the License.
#######################################################################################
-FROM ubuntu:18.04 as INSTALL
+FROM ubuntu:20.04 as INSTALL
+
+ARG APT_PROXY
+RUN if [ ! -z $APT_PROXY ] ; then \
+ echo "Acquire::http::Proxy \"$APT_PROXY\";" > /etc/apt/apt.conf.d/proxy.conf ;\
+ echo "Acquire::https::Proxy \"$APT_PROXY\";" >> /etc/apt/apt.conf.d/proxy.conf ;\
+ fi
RUN DEBIAN_FRONTEND=noninteractive apt-get --yes update && \
DEBIAN_FRONTEND=noninteractive apt-get --yes install \
- gcc=4:7.4.* \
- python3=3.6.* \
- python3-dev=3.6.* \
- python3-setuptools=39.0.* \
- curl=7.58.* \
- libcurl4-openssl-dev=7.58.* \
- libssl-dev=1.1.* && \
- python3 -m easy_install pip==21.0.1 setuptools==51.0.0
+ gcc=4:9.3.* \
+ python3=3.8.* \
+ python3-dev=3.8.* \
+ python3-pip=20.0.2* \
+ python3-setuptools=45.2.* \
+ curl=7.68.*
+
+RUN DEBIAN_FRONTEND=noninteractive apt-get --yes install \
+ libcurl4-openssl-dev=7.68.* \
+ libssl-dev=1.1.*
ARG PYTHON3_OSMCLIENT_URL
ARG PYTHON3_OSM_IM_URL
@@ -41,13 +49,22 @@
-r /usr/lib/python3/dist-packages/osmclient/requirements.txt \
-r /usr/lib/python3/dist-packages/osm_im/requirements.txt
-FROM ubuntu:18.04 as FINAL
+#######################################################################################
+FROM ubuntu:20.04 as FINAL
+
+ARG APT_PROXY
+RUN if [ ! -z $APT_PROXY ] ; then \
+ echo "Acquire::http::Proxy \"$APT_PROXY\";" > /etc/apt/apt.conf.d/proxy.conf ;\
+ echo "Acquire::https::Proxy \"$APT_PROXY\";" >> /etc/apt/apt.conf.d/proxy.conf ;\
+ fi
RUN DEBIAN_FRONTEND=noninteractive apt-get --yes update && \
- DEBIAN_FRONTEND=noninteractive apt-get --yes install python3-minimal=3.6.*
+ DEBIAN_FRONTEND=noninteractive apt-get --yes install \
+ python3-minimal=3.8.* \
+ && rm -rf /var/lib/apt/lists/*
COPY --from=INSTALL /usr/lib/python3/dist-packages /usr/lib/python3/dist-packages
-COPY --from=INSTALL /usr/local/lib/python3.6/dist-packages /usr/local/lib/python3.6/dist-packages
+COPY --from=INSTALL /usr/local/lib/python3.8/dist-packages /usr/local/lib/python3.8/dist-packages
ENV OSM_SOL005=True
ENV OSM_HOSTNAME=nbi:9999
diff --git a/docker/tests/Dockerfile b/docker/tests/Dockerfile
index 711b66a..0c1de38 100644
--- a/docker/tests/Dockerfile
+++ b/docker/tests/Dockerfile
@@ -15,22 +15,24 @@
########################################################################
-FROM ubuntu:18.04 as INSTALL
+FROM ubuntu:20.04 as FINAL
RUN DEBIAN_FRONTEND=noninteractive apt-get --yes update && \
DEBIAN_FRONTEND=noninteractive apt-get --yes install \
- gcc=4:7.4.* \
- python3=3.6.* \
- python3-dev=3.6.* \
- python3-setuptools=39.0.* \
- curl=7.58.* \
+ gcc=4:9.3.* \
+ python3=3.8.* \
+ python3-dev=3.8.* \
+ python3-pip=20.0.2* \
+ python3-setuptools=45.2.* \
+ curl=7.68.*
+
+RUN DEBIAN_FRONTEND=noninteractive apt-get --yes install \
gettext-base=0.19.* \
- git=1:2.17.* \
+ git=1:2.25.* \
iputils-ping=3:* \
- jq=1.5* \
- libcurl4-openssl-dev=7.58.* \
- libssl-dev=1.1.* && \
- python3 -m easy_install pip==21.0.1 setuptools==51.0.0
+ jq=1.6* \
+ libcurl4-openssl-dev=7.68.* \
+ libssl-dev=1.1.*
ARG OSM_TESTS_URL
ARG PYTHON3_OSM_IM_URL