@@ -92,10 +92,7 @@ RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
92
92
&& rm -f /var/cache/apt/archives/*.deb
93
93
94
94
# Install the desired versions of Python.
95
- RUN for PYTHON_VERSION in 2.7.17 3.6.9 3.7.5 3.8.0; do \
96
- set -ex \
97
- && wget --no-check-certificate -O python-${PYTHON_VERSION}.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \
98
- && wget --no-check-certificate -O python-${PYTHON_VERSION}.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \
95
+ RUN set -ex \
99
96
&& export GNUPGHOME="$(mktemp -d)" \
100
97
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys \
101
98
# 2.7.17 (Benjamin Peterson)
@@ -106,23 +103,27 @@ RUN for PYTHON_VERSION in 2.7.17 3.6.9 3.7.5 3.8.0; do \
106
103
0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D \
107
104
# 3.8.0 (Łukasz Langa)
108
105
E3FF2839C048B25C084DEBE9B26995E310250568 \
109
- && gpg --batch --verify python-${PYTHON_VERSION}.tar.xz.asc python-${PYTHON_VERSION}.tar.xz \
110
- && rm -r "$GNUPGHOME" python-${PYTHON_VERSION}.tar.xz.asc \
111
- && mkdir -p /usr/src/python-${PYTHON_VERSION} \
112
- && tar -xJC /usr/src/python-${PYTHON_VERSION} --strip-components=1 -f python-${PYTHON_VERSION}.tar.xz \
113
- && rm python-${PYTHON_VERSION}.tar.xz \
114
- && cd /usr/src/python-${PYTHON_VERSION} \
115
- && ./configure \
116
- --enable-shared \
117
- # This works only on Python 2.7 and throws a warning on every other
118
- # version, but seems otherwise harmless.
119
- --enable-unicode=ucs4 \
120
- --with-system-ffi \
121
- --without-ensurepip \
122
- && make -j$(nproc) \
123
- && make install \
124
- && ldconfig \
106
+ && for PYTHON_VERSION in 2.7.18 3.6.10 3.7.7 3.8.3; do \
107
+ wget --no-check-certificate -O python-${PYTHON_VERSION}.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \
108
+ && wget --no-check-certificate -O python-${PYTHON_VERSION}.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \
109
+ && gpg --batch --verify python-${PYTHON_VERSION}.tar.xz.asc python-${PYTHON_VERSION}.tar.xz \
110
+ && rm -r python-${PYTHON_VERSION}.tar.xz.asc \
111
+ && mkdir -p /usr/src/python-${PYTHON_VERSION} \
112
+ && tar -xJC /usr/src/python-${PYTHON_VERSION} --strip-components=1 -f python-${PYTHON_VERSION}.tar.xz \
113
+ && rm python-${PYTHON_VERSION}.tar.xz \
114
+ && cd /usr/src/python-${PYTHON_VERSION} \
115
+ && ./configure \
116
+ --enable-shared \
117
+ # This works only on Python 2.7 and throws a warning on every other
118
+ # version, but seems otherwise harmless.
119
+ --enable-unicode=ucs4 \
120
+ --with-system-ffi \
121
+ --without-ensurepip \
122
+ && make -j$(nproc) \
123
+ && make install \
124
+ && ldconfig \
125
125
; done \
126
+ && rm -r "${GNUPGHOME}" \
126
127
&& rm -rf /usr/src/python* \
127
128
&& rm -rf ~/.cache/
128
129
0 commit comments