summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-01-09 11:26:40 +0000
committerCan Eldem <celdem@gitlab.com>2020-01-09 11:26:40 +0000
commitd89872f850332736eb174f2b0ab28692fda6bf46 (patch)
tree3944b2eade680f90739f2f3805dfec1a7bb1a360 /Dockerfile
parentd51e4d90b3e7dbfc5b0a9ec90f37baf84dc105d0 (diff)
Upgrade python from 3.5 to 3.8
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile38
1 files changed, 18 insertions, 20 deletions
diff --git a/Dockerfile b/Dockerfile
index 5eac8c5..040ab84 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,12 +1,8 @@
-ARG LICENSE_FINDER_VERSION=5.11.1
-
-FROM licensefinder/license_finder:$LICENSE_FINDER_VERSION
-MAINTAINER GitLab
-
-ARG LICENSE_FINDER_VERSION
-ENV LICENSE_FINDER_VERSION $LICENSE_FINDER_VERSION
-
-# Install JDK 11
+FROM licensefinder/license_finder:5.11.1
+ENV PATH="${PATH}:/root/.asdf/shims:/root/.asdf/bin"
+ENV LM_HOME=/opt/license-management
+ENV LM_PYTHON_VERSION 3
+ENV LM_REPORT_VERSION ${LM_REPORT_VERSION:-2}
RUN cd /tmp && \
wget --quiet --no-cookies https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.5%2B10/OpenJDK11U-jdk_x64_linux_hotspot_11.0.5_10.tar.gz -O jdk-11.tgz && \
tar xf /tmp/jdk-11.tgz && \
@@ -17,22 +13,24 @@ RUN npm install npm-install-peers
# Don't let Rubygem fail with the numerous projects using PG or MySQL,
# install realpath, includes for python3, and pip for python3
# Install additional php packages for better composer package support
-# Install .NET Core 2.2, 3.0 because it is not installed in the license_finder image (https://github.com/pivotal/LicenseFinder/pull/632).
RUN add-apt-repository ppa:ondrej/php -y && apt-get update -y && \
apt-get install -y --no-install-recommends \
- libpq-dev libmysqlclient-dev realpath python3-dev python3-pip dotnet-sdk-2.2 dotnet-sdk-3.0 \
+ bsdmainutils \
+ libjpeg8-dev \
+ zlib1g-dev \
+ libpq-dev libmysqlclient-dev realpath dotnet-sdk-2.2 dotnet-sdk-3.0 \
php7.1-mbstring php7.1-intl php7.1-xml php7.1-soap -y && \
+ git clone --depth 1 --branch v0.7.6 https://github.com/asdf-vm/asdf.git $HOME/.asdf && \
+ echo 'pip' >> $HOME/.default-python-packages && \
+ echo 'setuptools' >> $HOME/.default-python-packages && \
+ echo '\n. $HOME/.asdf/asdf.sh' >> $HOME/.bashrc && \
+ asdf plugin-add python && \
+ echo 'python 3.8.1 3.5.9 2.7.17' >> $HOME/.tool-versions && \
+ asdf install && \
+ asdf global python 3.8.1 && \
+ asdf reshim && \
rm -rf /var/lib/apt/lists/*
-# Install setuptools, and fetch a recent version pip to be installed later on
-RUN pip install --upgrade pip setuptools \
- && python3 -m pip install --upgrade pip setuptools
-
-# Version of Python, defaults to Python 3.5
-ARG LM_PYTHON_VERSION=3.5
-ENV LM_PYTHON_VERSION $LM_PYTHON_VERSION
-ENV LM_REPORT_VERSION ${LM_REPORT_VERSION:-1}
-
COPY test /test
COPY run.sh /
COPY . /opt/license-management/