Skip to content

Commit 70597e8

Browse files
committed
PYTHON_VERSION_PATCH docker argument
1 parent dfd482f commit 70597e8

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

python/python/Dockerfile.python

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,18 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1717
&& rm -rf /var/lib/apt/lists/*
1818

1919
# Download and extract the Python source code
20+
ARG PYTHON_VERSION_PATCH
2021
ARG PYTHON_VERSION
22+
2123
RUN cd "/tmp" \
22-
&& wget -qO- "https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz" | tar xvz \
23-
&& cd "/tmp/Python-${PYTHON_VERSION}" \
24+
&& wget -qO- "https://www.python.org/ftp/python/${PYTHON_VERSION_PATCH}/Python-${PYTHON_VERSION_PATCH}.tgz" | tar xvz \
25+
&& cd "/tmp/Python-${PYTHON_VERSION_PATCH}" \
2426
&& ./configure --enable-optimizations --with-ensurepip=install \
2527
&& make -j "$(nproc)" \
2628
&& make altinstall
2729

28-
RUN PYTHON_MAJOR_MINOR_VERSION="${PYTHON_VERSION%.*}" \
29-
&& ln -s /usr/local/bin/python${PYTHON_MAJOR_MINOR_VERSION} /usr/local/bin/python \
30-
&& ln -s /usr/local/bin/pip${PYTHON_MAJOR_MINOR_VERSION} /usr/local/bin/pip
30+
RUN ln -s /usr/local/bin/python${PYTHON_VERSION} /usr/local/bin/python \
31+
&& ln -s /usr/local/bin/pip${PYTHON_VERSION} /usr/local/bin/pip
3132

3233
# We create the virtual environment in the home directory in the Dockerfile
3334
# for performance improvement.

0 commit comments

Comments
 (0)