File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff 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
2021ARG PYTHON_VERSION
22+
2123RUN 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.
You can’t perform that action at this time.
0 commit comments