Skip to content

Commit d2fcc84

Browse files
committed
Update PIP to 19.2.1
Also, use a fixed commit from https://github.com/pypa/get-pip and add a sha256 checksum for verification.
1 parent 13ae0c0 commit d2fcc84

File tree

45 files changed

+360
-113
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+360
-113
lines changed

2.7/alpine3.10/Dockerfile

+6-2
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,15 @@ RUN set -ex \
9797
&& python2 --version
9898

9999
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
100-
ENV PYTHON_PIP_VERSION 19.1.1
100+
ENV PYTHON_PIP_VERSION 19.2.1
101+
# https://github.com/pypa/get-pip
102+
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/404c9418e33c5031b1a9ab623168b3e8a2ed8c88/get-pip.py
103+
ENV PYTHON_GET_PIP_SHA256 56bb63d3cf54e7444351256f72a60f575f6d8c7f1faacffae33167afc8e7609d
101104

102105
RUN set -ex; \
103106
\
104-
wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \
107+
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
108+
echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \
105109
\
106110
python get-pip.py \
107111
--disable-pip-version-check \

2.7/alpine3.9/Dockerfile

+6-2
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,15 @@ RUN set -ex \
9797
&& python2 --version
9898

9999
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
100-
ENV PYTHON_PIP_VERSION 19.1.1
100+
ENV PYTHON_PIP_VERSION 19.2.1
101+
# https://github.com/pypa/get-pip
102+
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/404c9418e33c5031b1a9ab623168b3e8a2ed8c88/get-pip.py
103+
ENV PYTHON_GET_PIP_SHA256 56bb63d3cf54e7444351256f72a60f575f6d8c7f1faacffae33167afc8e7609d
101104

102105
RUN set -ex; \
103106
\
104-
wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \
107+
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
108+
echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \
105109
\
106110
python get-pip.py \
107111
--disable-pip-version-check \

2.7/buster/Dockerfile

+6-2
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,15 @@ RUN set -ex \
5757
&& python2 --version
5858

5959
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
60-
ENV PYTHON_PIP_VERSION 19.1.1
60+
ENV PYTHON_PIP_VERSION 19.2.1
61+
# https://github.com/pypa/get-pip
62+
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/404c9418e33c5031b1a9ab623168b3e8a2ed8c88/get-pip.py
63+
ENV PYTHON_GET_PIP_SHA256 56bb63d3cf54e7444351256f72a60f575f6d8c7f1faacffae33167afc8e7609d
6164

6265
RUN set -ex; \
6366
\
64-
wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \
67+
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
68+
echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum --check --strict -; \
6569
\
6670
python get-pip.py \
6771
--disable-pip-version-check \

2.7/buster/slim/Dockerfile

+6-2
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,19 @@ RUN set -ex \
9090
&& python2 --version
9191

9292
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
93-
ENV PYTHON_PIP_VERSION 19.1.1
93+
ENV PYTHON_PIP_VERSION 19.2.1
94+
# https://github.com/pypa/get-pip
95+
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/404c9418e33c5031b1a9ab623168b3e8a2ed8c88/get-pip.py
96+
ENV PYTHON_GET_PIP_SHA256 56bb63d3cf54e7444351256f72a60f575f6d8c7f1faacffae33167afc8e7609d
9497

9598
RUN set -ex; \
9699
\
97100
savedAptMark="$(apt-mark showmanual)"; \
98101
apt-get update; \
99102
apt-get install -y --no-install-recommends wget; \
100103
\
101-
wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \
104+
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
105+
echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum --check --strict -; \
102106
\
103107
apt-mark auto '.*' > /dev/null; \
104108
[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \

2.7/stretch/Dockerfile

+6-2
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,15 @@ RUN set -ex \
5757
&& python2 --version
5858

5959
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
60-
ENV PYTHON_PIP_VERSION 19.1.1
60+
ENV PYTHON_PIP_VERSION 19.2.1
61+
# https://github.com/pypa/get-pip
62+
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/404c9418e33c5031b1a9ab623168b3e8a2ed8c88/get-pip.py
63+
ENV PYTHON_GET_PIP_SHA256 56bb63d3cf54e7444351256f72a60f575f6d8c7f1faacffae33167afc8e7609d
6164

6265
RUN set -ex; \
6366
\
64-
wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \
67+
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
68+
echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum --check --strict -; \
6569
\
6670
python get-pip.py \
6771
--disable-pip-version-check \

2.7/stretch/slim/Dockerfile

+6-2
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,19 @@ RUN set -ex \
9090
&& python2 --version
9191

9292
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
93-
ENV PYTHON_PIP_VERSION 19.1.1
93+
ENV PYTHON_PIP_VERSION 19.2.1
94+
# https://github.com/pypa/get-pip
95+
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/404c9418e33c5031b1a9ab623168b3e8a2ed8c88/get-pip.py
96+
ENV PYTHON_GET_PIP_SHA256 56bb63d3cf54e7444351256f72a60f575f6d8c7f1faacffae33167afc8e7609d
9497

9598
RUN set -ex; \
9699
\
97100
savedAptMark="$(apt-mark showmanual)"; \
98101
apt-get update; \
99102
apt-get install -y --no-install-recommends wget; \
100103
\
101-
wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \
104+
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
105+
echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum --check --strict -; \
102106
\
103107
apt-mark auto '.*' > /dev/null; \
104108
[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \

2.7/windows/windowsservercore-1803/Dockerfile

+15-5
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,24 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}.amd64.msi' -f $env
3838
Write-Host 'Removing ...'; \
3939
Remove-Item python.msi -Force; \
4040
\
41-
Write-Host 'Complete.';
41+
Write-Host 'Complete.'
4242

4343
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
44-
ENV PYTHON_PIP_VERSION 19.1.1
44+
ENV PYTHON_PIP_VERSION 19.2.1
45+
# https://github.com/pypa/get-pip
46+
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/404c9418e33c5031b1a9ab623168b3e8a2ed8c88/get-pip.py
47+
ENV PYTHON_GET_PIP_SHA256 56bb63d3cf54e7444351256f72a60f575f6d8c7f1faacffae33167afc8e7609d
4548

46-
RUN Write-Host ('Installing pip=={0} ...' -f $env:PYTHON_PIP_VERSION); \
49+
RUN Write-Host ('Downloading get-pip.py ({0}) ...' -f $env:PYTHON_GET_PIP_URL); \
4750
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
48-
Invoke-WebRequest -Uri 'https://bootstrap.pypa.io/get-pip.py' -OutFile 'get-pip.py'; \
51+
Invoke-WebRequest -Uri $env:PYTHON_GET_PIP_URL -OutFile 'get-pip.py'; \
52+
Write-Host ('Verifying sha256 ({0}) ...' -f $env:PYTHON_GET_PIP_SHA256); \
53+
if ((Get-FileHash 'get-pip.py' -Algorithm sha256).Hash -ne $env:PYTHON_GET_PIP_SHA256) { \
54+
Write-Host 'FAILED!'; \
55+
exit 1; \
56+
}; \
57+
\
58+
Write-Host ('Installing pip=={0} ...' -f $env:PYTHON_PIP_VERSION); \
4959
python get-pip.py \
5060
--disable-pip-version-check \
5161
--no-cache-dir \
@@ -56,7 +66,7 @@ RUN Write-Host ('Installing pip=={0} ...' -f $env:PYTHON_PIP_VERSION); \
5666
Write-Host 'Verifying pip install ...'; \
5767
pip --version; \
5868
\
59-
Write-Host 'Complete.';
69+
Write-Host 'Complete.'
6070

6171
# install "virtualenv", since the vast majority of users of this image will want it
6272
RUN pip install --no-cache-dir virtualenv

2.7/windows/windowsservercore-1809/Dockerfile

+15-5
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,24 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}.amd64.msi' -f $env
3838
Write-Host 'Removing ...'; \
3939
Remove-Item python.msi -Force; \
4040
\
41-
Write-Host 'Complete.';
41+
Write-Host 'Complete.'
4242

4343
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
44-
ENV PYTHON_PIP_VERSION 19.1.1
44+
ENV PYTHON_PIP_VERSION 19.2.1
45+
# https://github.com/pypa/get-pip
46+
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/404c9418e33c5031b1a9ab623168b3e8a2ed8c88/get-pip.py
47+
ENV PYTHON_GET_PIP_SHA256 56bb63d3cf54e7444351256f72a60f575f6d8c7f1faacffae33167afc8e7609d
4548

46-
RUN Write-Host ('Installing pip=={0} ...' -f $env:PYTHON_PIP_VERSION); \
49+
RUN Write-Host ('Downloading get-pip.py ({0}) ...' -f $env:PYTHON_GET_PIP_URL); \
4750
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
48-
Invoke-WebRequest -Uri 'https://bootstrap.pypa.io/get-pip.py' -OutFile 'get-pip.py'; \
51+
Invoke-WebRequest -Uri $env:PYTHON_GET_PIP_URL -OutFile 'get-pip.py'; \
52+
Write-Host ('Verifying sha256 ({0}) ...' -f $env:PYTHON_GET_PIP_SHA256); \
53+
if ((Get-FileHash 'get-pip.py' -Algorithm sha256).Hash -ne $env:PYTHON_GET_PIP_SHA256) { \
54+
Write-Host 'FAILED!'; \
55+
exit 1; \
56+
}; \
57+
\
58+
Write-Host ('Installing pip=={0} ...' -f $env:PYTHON_PIP_VERSION); \
4959
python get-pip.py \
5060
--disable-pip-version-check \
5161
--no-cache-dir \
@@ -56,7 +66,7 @@ RUN Write-Host ('Installing pip=={0} ...' -f $env:PYTHON_PIP_VERSION); \
5666
Write-Host 'Verifying pip install ...'; \
5767
pip --version; \
5868
\
59-
Write-Host 'Complete.';
69+
Write-Host 'Complete.'
6070

6171
# install "virtualenv", since the vast majority of users of this image will want it
6272
RUN pip install --no-cache-dir virtualenv

2.7/windows/windowsservercore-ltsc2016/Dockerfile

+15-5
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,24 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}.amd64.msi' -f $env
3838
Write-Host 'Removing ...'; \
3939
Remove-Item python.msi -Force; \
4040
\
41-
Write-Host 'Complete.';
41+
Write-Host 'Complete.'
4242

4343
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
44-
ENV PYTHON_PIP_VERSION 19.1.1
44+
ENV PYTHON_PIP_VERSION 19.2.1
45+
# https://github.com/pypa/get-pip
46+
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/404c9418e33c5031b1a9ab623168b3e8a2ed8c88/get-pip.py
47+
ENV PYTHON_GET_PIP_SHA256 56bb63d3cf54e7444351256f72a60f575f6d8c7f1faacffae33167afc8e7609d
4548

46-
RUN Write-Host ('Installing pip=={0} ...' -f $env:PYTHON_PIP_VERSION); \
49+
RUN Write-Host ('Downloading get-pip.py ({0}) ...' -f $env:PYTHON_GET_PIP_URL); \
4750
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \
48-
Invoke-WebRequest -Uri 'https://bootstrap.pypa.io/get-pip.py' -OutFile 'get-pip.py'; \
51+
Invoke-WebRequest -Uri $env:PYTHON_GET_PIP_URL -OutFile 'get-pip.py'; \
52+
Write-Host ('Verifying sha256 ({0}) ...' -f $env:PYTHON_GET_PIP_SHA256); \
53+
if ((Get-FileHash 'get-pip.py' -Algorithm sha256).Hash -ne $env:PYTHON_GET_PIP_SHA256) { \
54+
Write-Host 'FAILED!'; \
55+
exit 1; \
56+
}; \
57+
\
58+
Write-Host ('Installing pip=={0} ...' -f $env:PYTHON_PIP_VERSION); \
4959
python get-pip.py \
5060
--disable-pip-version-check \
5161
--no-cache-dir \
@@ -56,7 +66,7 @@ RUN Write-Host ('Installing pip=={0} ...' -f $env:PYTHON_PIP_VERSION); \
5666
Write-Host 'Verifying pip install ...'; \
5767
pip --version; \
5868
\
59-
Write-Host 'Complete.';
69+
Write-Host 'Complete.'
6070

6171
# install "virtualenv", since the vast majority of users of this image will want it
6272
RUN pip install --no-cache-dir virtualenv

3.5/alpine3.10/Dockerfile

+6-2
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,15 @@ RUN cd /usr/local/bin \
139139
&& ln -s python3-config python-config
140140

141141
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
142-
ENV PYTHON_PIP_VERSION 19.1.1
142+
ENV PYTHON_PIP_VERSION 19.2.1
143+
# https://github.com/pypa/get-pip
144+
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/404c9418e33c5031b1a9ab623168b3e8a2ed8c88/get-pip.py
145+
ENV PYTHON_GET_PIP_SHA256 56bb63d3cf54e7444351256f72a60f575f6d8c7f1faacffae33167afc8e7609d
143146

144147
RUN set -ex; \
145148
\
146-
wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \
149+
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
150+
echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \
147151
\
148152
python get-pip.py \
149153
--disable-pip-version-check \

3.5/alpine3.9/Dockerfile

+6-2
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,15 @@ RUN cd /usr/local/bin \
139139
&& ln -s python3-config python-config
140140

141141
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
142-
ENV PYTHON_PIP_VERSION 19.1.1
142+
ENV PYTHON_PIP_VERSION 19.2.1
143+
# https://github.com/pypa/get-pip
144+
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/404c9418e33c5031b1a9ab623168b3e8a2ed8c88/get-pip.py
145+
ENV PYTHON_GET_PIP_SHA256 56bb63d3cf54e7444351256f72a60f575f6d8c7f1faacffae33167afc8e7609d
143146

144147
RUN set -ex; \
145148
\
146-
wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \
149+
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
150+
echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \
147151
\
148152
python get-pip.py \
149153
--disable-pip-version-check \

3.5/buster/Dockerfile

+6-2
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,15 @@ RUN cd /usr/local/bin \
102102
&& ln -s python3-config python-config
103103

104104
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
105-
ENV PYTHON_PIP_VERSION 19.1.1
105+
ENV PYTHON_PIP_VERSION 19.2.1
106+
# https://github.com/pypa/get-pip
107+
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/404c9418e33c5031b1a9ab623168b3e8a2ed8c88/get-pip.py
108+
ENV PYTHON_GET_PIP_SHA256 56bb63d3cf54e7444351256f72a60f575f6d8c7f1faacffae33167afc8e7609d
106109

107110
RUN set -ex; \
108111
\
109-
wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \
112+
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
113+
echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum --check --strict -; \
110114
\
111115
python get-pip.py \
112116
--disable-pip-version-check \

3.5/buster/slim/Dockerfile

+6-2
Original file line numberDiff line numberDiff line change
@@ -137,15 +137,19 @@ RUN cd /usr/local/bin \
137137
&& ln -s python3-config python-config
138138

139139
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
140-
ENV PYTHON_PIP_VERSION 19.1.1
140+
ENV PYTHON_PIP_VERSION 19.2.1
141+
# https://github.com/pypa/get-pip
142+
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/404c9418e33c5031b1a9ab623168b3e8a2ed8c88/get-pip.py
143+
ENV PYTHON_GET_PIP_SHA256 56bb63d3cf54e7444351256f72a60f575f6d8c7f1faacffae33167afc8e7609d
141144

142145
RUN set -ex; \
143146
\
144147
savedAptMark="$(apt-mark showmanual)"; \
145148
apt-get update; \
146149
apt-get install -y --no-install-recommends wget; \
147150
\
148-
wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \
151+
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
152+
echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum --check --strict -; \
149153
\
150154
apt-mark auto '.*' > /dev/null; \
151155
[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \

3.5/stretch/Dockerfile

+6-2
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,15 @@ RUN cd /usr/local/bin \
102102
&& ln -s python3-config python-config
103103

104104
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
105-
ENV PYTHON_PIP_VERSION 19.1.1
105+
ENV PYTHON_PIP_VERSION 19.2.1
106+
# https://github.com/pypa/get-pip
107+
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/404c9418e33c5031b1a9ab623168b3e8a2ed8c88/get-pip.py
108+
ENV PYTHON_GET_PIP_SHA256 56bb63d3cf54e7444351256f72a60f575f6d8c7f1faacffae33167afc8e7609d
106109

107110
RUN set -ex; \
108111
\
109-
wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \
112+
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
113+
echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum --check --strict -; \
110114
\
111115
python get-pip.py \
112116
--disable-pip-version-check \

3.5/stretch/slim/Dockerfile

+6-2
Original file line numberDiff line numberDiff line change
@@ -137,15 +137,19 @@ RUN cd /usr/local/bin \
137137
&& ln -s python3-config python-config
138138

139139
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
140-
ENV PYTHON_PIP_VERSION 19.1.1
140+
ENV PYTHON_PIP_VERSION 19.2.1
141+
# https://github.com/pypa/get-pip
142+
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/404c9418e33c5031b1a9ab623168b3e8a2ed8c88/get-pip.py
143+
ENV PYTHON_GET_PIP_SHA256 56bb63d3cf54e7444351256f72a60f575f6d8c7f1faacffae33167afc8e7609d
141144

142145
RUN set -ex; \
143146
\
144147
savedAptMark="$(apt-mark showmanual)"; \
145148
apt-get update; \
146149
apt-get install -y --no-install-recommends wget; \
147150
\
148-
wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \
151+
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
152+
echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum --check --strict -; \
149153
\
150154
apt-mark auto '.*' > /dev/null; \
151155
[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \

3.6/alpine3.10/Dockerfile

+6-2
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,15 @@ RUN cd /usr/local/bin \
141141
&& ln -s python3-config python-config
142142

143143
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
144-
ENV PYTHON_PIP_VERSION 19.1.1
144+
ENV PYTHON_PIP_VERSION 19.2.1
145+
# https://github.com/pypa/get-pip
146+
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/404c9418e33c5031b1a9ab623168b3e8a2ed8c88/get-pip.py
147+
ENV PYTHON_GET_PIP_SHA256 56bb63d3cf54e7444351256f72a60f575f6d8c7f1faacffae33167afc8e7609d
145148

146149
RUN set -ex; \
147150
\
148-
wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \
151+
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
152+
echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \
149153
\
150154
python get-pip.py \
151155
--disable-pip-version-check \

3.6/alpine3.9/Dockerfile

+6-2
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,15 @@ RUN cd /usr/local/bin \
141141
&& ln -s python3-config python-config
142142

143143
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
144-
ENV PYTHON_PIP_VERSION 19.1.1
144+
ENV PYTHON_PIP_VERSION 19.2.1
145+
# https://github.com/pypa/get-pip
146+
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/404c9418e33c5031b1a9ab623168b3e8a2ed8c88/get-pip.py
147+
ENV PYTHON_GET_PIP_SHA256 56bb63d3cf54e7444351256f72a60f575f6d8c7f1faacffae33167afc8e7609d
145148

146149
RUN set -ex; \
147150
\
148-
wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \
151+
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
152+
echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \
149153
\
150154
python get-pip.py \
151155
--disable-pip-version-check \

3.6/buster/Dockerfile

+6-2
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,15 @@ RUN cd /usr/local/bin \
102102
&& ln -s python3-config python-config
103103

104104
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
105-
ENV PYTHON_PIP_VERSION 19.1.1
105+
ENV PYTHON_PIP_VERSION 19.2.1
106+
# https://github.com/pypa/get-pip
107+
ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/404c9418e33c5031b1a9ab623168b3e8a2ed8c88/get-pip.py
108+
ENV PYTHON_GET_PIP_SHA256 56bb63d3cf54e7444351256f72a60f575f6d8c7f1faacffae33167afc8e7609d
106109

107110
RUN set -ex; \
108111
\
109-
wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \
112+
wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \
113+
echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum --check --strict -; \
110114
\
111115
python get-pip.py \
112116
--disable-pip-version-check \

0 commit comments

Comments
 (0)