diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ec43d5..dc58a80 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased * add .gitconfig file to Docker image to mark /CIRRUS-core and /CIRRUS-DAAC as safe +* Add python3.8 and python3.10 targets in the Dockerfile ## v18.3.1.0 * Added separate urs_tea_client_id and urs_tea_client_password that can be specified if these are different from the non-tea versions of the variables. diff --git a/Dockerfile b/Dockerfile index f605186..0c440b1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -47,6 +47,43 @@ RUN \ WORKDIR /CIRRUS-core +# Python310 target +FROM core_base AS python310 +ENV PYTHON_3_10_VERSION "3.10.14" +RUN \ + dnf groupinstall "Development Tools" -y && \ + dnf install openssl-devel bzip2-devel libffi-devel sqlite-devel -y && \ + cd /usr/local && \ + wget https://www.python.org/ftp/python/${PYTHON_3_10_VERSION}/Python-${PYTHON_3_10_VERSION}.tgz && \ + tar xzf Python-${PYTHON_3_10_VERSION}.tgz && cd Python-${PYTHON_3_10_VERSION} && \ + ./configure --enable-optimizations \ + --enable-shared \ + --enable-loadable-sqlite-extensions \ + --prefix /usr/local \ + LDFLAGS=-Wl,-rpath=/usr/local/lib && \ + make altinstall && \ + update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.10 1 && \ + python3 -m pip install boto3 setuptools + +# Python38 target +FROM core_base AS python38 +ENV PYTHON_3_8_VERSION "3.8.16" +RUN \ + dnf groupinstall "Development Tools" -y && \ + dnf install openssl-devel bzip2-devel libffi-devel sqlite-devel -y && \ + cd /usr/local && \ + wget https://www.python.org/ftp/python/${PYTHON_3_8_VERSION}/Python-${PYTHON_3_8_VERSION}.tgz && \ + tar xzf Python-${PYTHON_3_8_VERSION}.tgz && cd Python-${PYTHON_3_8_VERSION} && \ + ./configure --enable-optimizations \ + --enable-shared \ + --enable-loadable-sqlite-extensions \ + --prefix /usr/local \ + LDFLAGS=-Wl,-rpath=/usr/local/lib && \ + make altinstall && \ + update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.8 1 && \ + python3 -m pip install boto3 setuptools + + # Python3 target FROM core_base AS python3 # Python 3