diff options
author | vrvarma <vikas.varma@att.com> | 2020-09-13 21:59:50 -0400 |
---|---|---|
committer | vrvarma <vikas.varma@att.com> | 2020-09-13 22:00:05 -0400 |
commit | 7b4619e523dbeb519eed3b141a0359108c614f55 (patch) | |
tree | 8fe742849fae959d7525cdd76297ac78fcf62f3d /docker/osdf | |
parent | eaba24134a5a8124387b229dcc6cac53ad00d62c (diff) |
Upgrade osdf python to 3.8
Upgrade docker image to ubuntu20.04
Change-Id: I9fbb3acc921fe689bc4a3302543e5e872c72668f
Signed-off-by: vrvarma <vikas.varma@att.com>
Issue-ID: OPTFRA-796
Diffstat (limited to 'docker/osdf')
-rw-r--r-- | docker/osdf/Dockerfile | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/docker/osdf/Dockerfile b/docker/osdf/Dockerfile index 66a5aa7..c74ad5a 100644 --- a/docker/osdf/Dockerfile +++ b/docker/osdf/Dockerfile @@ -17,12 +17,13 @@ # ------------------------------------------------------------------------- # -FROM ubuntu:16.04 +FROM ubuntu:20.04 ARG MVN_ARTIFACT_VERSION ARG REPO ARG HTTP_PROXY=${HTTP_PROXY} ARG HTTPS_PROXY=${HTTPS_PROXY} +ARG DEBIAN_FRONTEND=noninteractive ENV http_proxy $HTTP_PROXY ENV https_proxy $HTTPS_PROXY @@ -30,26 +31,20 @@ ENV https_proxy $HTTPS_PROXY ENV OSDF_PORT "8699" EXPOSE ${OSDF_PORT} -ENV MZN 2.4.2 -ENV MZN_BASENAME MiniZincIDE-${MZN}-bundle-linux -ENV MZN_GH_BASE https://github.com/MiniZinc/MiniZincIDE -ENV MZN_DL_URL ${MZN_GH_BASE}/releases/download/${MZN}/${MZN_BASENAME}-x86_64.tgz - RUN apt-get update -y \ - && apt-get install -y --no-install-recommends vim unzip wget libmpfr-dev ca-certificates\ - && apt-get install -y --no-install-recommends git libqt5printsupport5 build-essential \ - && apt-get install -y --no-install-recommends python3 python3-setuptools python3-dev \ - && easy_install3 pip \ - && pip install --no-cache-dir --upgrade virtualenv pip wheel setuptools && rm -rf /var/lib/apt/lists/* + && apt-get install -y --no-install-recommends software-properties-common wget \ + curl ca-certificates vim unzip zip git binutils binfmt-support build-essential \ + python3 python3-setuptools python3-dev \ + && ln -s /usr/bin/python3.8 /usr/bin/python \ + && curl -s https://bootstrap.pypa.io/get-pip.py | python \ + && python -m pip --no-cache-dir install --upgrade pip wheel setuptools && rm -rf /var/lib/apt/lists/* -RUN ln -s /usr/bin/python3.5 /usr/bin/python +ARG MZN_DL_URL=https://github.com/MiniZinc/MiniZincIDE/releases/download/2.4.3/MiniZincIDE-2.4.3-bundle-linux-x86_64.tgz # Minizinc RUN wget -q $MZN_DL_URL -O /tmp/mz.tgz \ - && tar xzf /tmp/mz.tgz \ - && mv $MZN_BASENAME /mz-dist \ - && rm /tmp/mz.tgz \ - && echo PATH=/mz-dist/bin:$PATH >> ~/.bashrc + && mkdir -p /mz-dist && tar xzf /tmp/mz.tgz -C /mz-dist --strip-components 1\ + && rm /tmp/mz.tgz ENV SHELL /bin/bash ENV PATH /mz-dist/bin:$PATH @@ -74,7 +69,7 @@ RUN mkdir -p /var/log/onap/optf/osdf/ \ && chown -R onap:onap /var/log/onap \ && chown -R onap:onap /opt/osdf -RUN pip install --no-cache-dir -r requirements.txt -r requirements-osdf.txt +RUN python -m pip install --no-cache-dir -r requirements.txt -r requirements-osdf.txt USER onap |