Skip to content

Commit 4b37165

Browse files
authored
Merge pull request docker-library#144 from infosiftr/3.6.0a4
Update to 3.6.0a4 (and add "--force-reinstall" to pip)
2 parents 9286f02 + 855b85c commit 4b37165

24 files changed

+142
-28
lines changed

2.7/Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,12 @@ RUN set -ex \
4747
&& wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \
4848
&& python2 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \
4949
&& rm /tmp/get-pip.py \
50-
&& pip install --no-cache-dir --upgrade "pip==$PYTHON_PIP_VERSION" \
50+
# we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python
51+
# ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
52+
# https://github.com/docker-library/python/pull/143#issuecomment-241032683
53+
&& pip install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
54+
# then we use "pip list" to ensure we don't have more than one pip version installed
55+
# https://github.com/docker-library/python/pull/100
5156
&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
5257
\
5358
&& find /usr/local -depth \

2.7/alpine/Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,12 @@ RUN set -ex \
6464
&& wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \
6565
&& python2 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \
6666
&& rm /tmp/get-pip.py \
67-
&& pip install --no-cache-dir --upgrade "pip==$PYTHON_PIP_VERSION" \
67+
# we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python
68+
# ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
69+
# https://github.com/docker-library/python/pull/143#issuecomment-241032683
70+
&& pip install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
71+
# then we use "pip list" to ensure we don't have more than one pip version installed
72+
# https://github.com/docker-library/python/pull/100
6873
&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
6974
\
7075
&& find /usr/local -depth \

2.7/slim/Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,12 @@ RUN set -ex \
6060
&& wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \
6161
&& python2 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \
6262
&& rm /tmp/get-pip.py \
63-
&& pip install --no-cache-dir --upgrade "pip==$PYTHON_PIP_VERSION" \
63+
# we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python
64+
# ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
65+
# https://github.com/docker-library/python/pull/143#issuecomment-241032683
66+
&& pip install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
67+
# then we use "pip list" to ensure we don't have more than one pip version installed
68+
# https://github.com/docker-library/python/pull/100
6469
&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
6570
\
6671
&& find /usr/local -depth \

2.7/wheezy/Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,12 @@ RUN set -ex \
4747
&& wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \
4848
&& python2 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \
4949
&& rm /tmp/get-pip.py \
50-
&& pip install --no-cache-dir --upgrade "pip==$PYTHON_PIP_VERSION" \
50+
# we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python
51+
# ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
52+
# https://github.com/docker-library/python/pull/143#issuecomment-241032683
53+
&& pip install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
54+
# then we use "pip list" to ensure we don't have more than one pip version installed
55+
# https://github.com/docker-library/python/pull/100
5156
&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
5257
\
5358
&& find /usr/local -depth \

3.3/Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,12 @@ RUN set -ex \
5656
&& python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \
5757
&& rm /tmp/get-pip.py \
5858
; fi \
59-
&& pip3 install --no-cache-dir --upgrade "pip==$PYTHON_PIP_VERSION" \
59+
# we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python
60+
# ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
61+
# https://github.com/docker-library/python/pull/143#issuecomment-241032683
62+
&& pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
63+
# then we use "pip list" to ensure we don't have more than one pip version installed
64+
# https://github.com/docker-library/python/pull/100
6065
&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
6166
\
6267
&& find /usr/local -depth \

3.3/alpine/Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,12 @@ RUN set -ex \
7373
&& python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \
7474
&& rm /tmp/get-pip.py \
7575
; fi \
76-
&& pip3 install --no-cache-dir --upgrade "pip==$PYTHON_PIP_VERSION" \
76+
# we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python
77+
# ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
78+
# https://github.com/docker-library/python/pull/143#issuecomment-241032683
79+
&& pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
80+
# then we use "pip list" to ensure we don't have more than one pip version installed
81+
# https://github.com/docker-library/python/pull/100
7782
&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
7883
\
7984
&& find /usr/local -depth \

3.3/slim/Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,12 @@ RUN set -ex \
6969
&& python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \
7070
&& rm /tmp/get-pip.py \
7171
; fi \
72-
&& pip3 install --no-cache-dir --upgrade "pip==$PYTHON_PIP_VERSION" \
72+
# we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python
73+
# ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
74+
# https://github.com/docker-library/python/pull/143#issuecomment-241032683
75+
&& pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
76+
# then we use "pip list" to ensure we don't have more than one pip version installed
77+
# https://github.com/docker-library/python/pull/100
7378
&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
7479
\
7580
&& find /usr/local -depth \

3.3/wheezy/Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,12 @@ RUN set -ex \
5656
&& python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \
5757
&& rm /tmp/get-pip.py \
5858
; fi \
59-
&& pip3 install --no-cache-dir --upgrade "pip==$PYTHON_PIP_VERSION" \
59+
# we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python
60+
# ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
61+
# https://github.com/docker-library/python/pull/143#issuecomment-241032683
62+
&& pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
63+
# then we use "pip list" to ensure we don't have more than one pip version installed
64+
# https://github.com/docker-library/python/pull/100
6065
&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
6166
\
6267
&& find /usr/local -depth \

3.4/Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,12 @@ RUN set -ex \
5656
&& python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \
5757
&& rm /tmp/get-pip.py \
5858
; fi \
59-
&& pip3 install --no-cache-dir --upgrade "pip==$PYTHON_PIP_VERSION" \
59+
# we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python
60+
# ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
61+
# https://github.com/docker-library/python/pull/143#issuecomment-241032683
62+
&& pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
63+
# then we use "pip list" to ensure we don't have more than one pip version installed
64+
# https://github.com/docker-library/python/pull/100
6065
&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
6166
\
6267
&& find /usr/local -depth \

3.4/alpine/Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,12 @@ RUN set -ex \
7373
&& python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \
7474
&& rm /tmp/get-pip.py \
7575
; fi \
76-
&& pip3 install --no-cache-dir --upgrade "pip==$PYTHON_PIP_VERSION" \
76+
# we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python
77+
# ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
78+
# https://github.com/docker-library/python/pull/143#issuecomment-241032683
79+
&& pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
80+
# then we use "pip list" to ensure we don't have more than one pip version installed
81+
# https://github.com/docker-library/python/pull/100
7782
&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
7883
\
7984
&& find /usr/local -depth \

3.4/slim/Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,12 @@ RUN set -ex \
6969
&& python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \
7070
&& rm /tmp/get-pip.py \
7171
; fi \
72-
&& pip3 install --no-cache-dir --upgrade "pip==$PYTHON_PIP_VERSION" \
72+
# we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python
73+
# ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
74+
# https://github.com/docker-library/python/pull/143#issuecomment-241032683
75+
&& pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
76+
# then we use "pip list" to ensure we don't have more than one pip version installed
77+
# https://github.com/docker-library/python/pull/100
7378
&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
7479
\
7580
&& find /usr/local -depth \

3.4/wheezy/Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,12 @@ RUN set -ex \
5656
&& python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \
5757
&& rm /tmp/get-pip.py \
5858
; fi \
59-
&& pip3 install --no-cache-dir --upgrade "pip==$PYTHON_PIP_VERSION" \
59+
# we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python
60+
# ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
61+
# https://github.com/docker-library/python/pull/143#issuecomment-241032683
62+
&& pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
63+
# then we use "pip list" to ensure we don't have more than one pip version installed
64+
# https://github.com/docker-library/python/pull/100
6065
&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
6166
\
6267
&& find /usr/local -depth \

3.5/Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,12 @@ RUN set -ex \
5656
&& python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \
5757
&& rm /tmp/get-pip.py \
5858
; fi \
59-
&& pip3 install --no-cache-dir --upgrade "pip==$PYTHON_PIP_VERSION" \
59+
# we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python
60+
# ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
61+
# https://github.com/docker-library/python/pull/143#issuecomment-241032683
62+
&& pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
63+
# then we use "pip list" to ensure we don't have more than one pip version installed
64+
# https://github.com/docker-library/python/pull/100
6065
&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
6166
\
6267
&& find /usr/local -depth \

3.5/alpine/Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,12 @@ RUN set -ex \
7373
&& python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \
7474
&& rm /tmp/get-pip.py \
7575
; fi \
76-
&& pip3 install --no-cache-dir --upgrade "pip==$PYTHON_PIP_VERSION" \
76+
# we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python
77+
# ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
78+
# https://github.com/docker-library/python/pull/143#issuecomment-241032683
79+
&& pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
80+
# then we use "pip list" to ensure we don't have more than one pip version installed
81+
# https://github.com/docker-library/python/pull/100
7782
&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
7883
\
7984
&& find /usr/local -depth \

3.5/slim/Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,12 @@ RUN set -ex \
6969
&& python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \
7070
&& rm /tmp/get-pip.py \
7171
; fi \
72-
&& pip3 install --no-cache-dir --upgrade "pip==$PYTHON_PIP_VERSION" \
72+
# we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python
73+
# ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
74+
# https://github.com/docker-library/python/pull/143#issuecomment-241032683
75+
&& pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
76+
# then we use "pip list" to ensure we don't have more than one pip version installed
77+
# https://github.com/docker-library/python/pull/100
7378
&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
7479
\
7580
&& find /usr/local -depth \

3.5/windows/windowsservercore/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env
4242
\
4343
$pipInstall = ('pip=={0}' -f $env:PYTHON_PIP_VERSION); \
4444
Write-Host ('Installing {0} ...' -f $pipInstall); \
45-
pip install --no-cache-dir --upgrade $pipInstall; \
45+
# we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python
46+
# ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
47+
# https://github.com/docker-library/python/pull/143#issuecomment-241032683
48+
pip install --no-cache-dir --upgrade --force-reinstall $pipInstall; \
4649
\
4750
Write-Host 'Verifying pip install ...'; \
4851
pip --version; \

3.6/Dockerfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1414
&& rm -rf /var/lib/apt/lists/*
1515

1616
ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D
17-
ENV PYTHON_VERSION 3.6.0a3
17+
ENV PYTHON_VERSION 3.6.0a4
1818

1919
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
2020
ENV PYTHON_PIP_VERSION 8.1.2
@@ -50,7 +50,12 @@ RUN set -ex \
5050
&& python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \
5151
&& rm /tmp/get-pip.py \
5252
; fi \
53-
&& pip3 install --no-cache-dir --upgrade "pip==$PYTHON_PIP_VERSION" \
53+
# we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python
54+
# ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
55+
# https://github.com/docker-library/python/pull/143#issuecomment-241032683
56+
&& pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
57+
# then we use "pip list" to ensure we don't have more than one pip version installed
58+
# https://github.com/docker-library/python/pull/100
5459
&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
5560
\
5661
&& find /usr/local -depth \

3.6/alpine/Dockerfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ENV LANG C.UTF-8
1212
RUN apk add --no-cache ca-certificates
1313

1414
ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D
15-
ENV PYTHON_VERSION 3.6.0a3
15+
ENV PYTHON_VERSION 3.6.0a4
1616

1717
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
1818
ENV PYTHON_PIP_VERSION 8.1.2
@@ -67,7 +67,12 @@ RUN set -ex \
6767
&& python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \
6868
&& rm /tmp/get-pip.py \
6969
; fi \
70-
&& pip3 install --no-cache-dir --upgrade "pip==$PYTHON_PIP_VERSION" \
70+
# we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python
71+
# ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
72+
# https://github.com/docker-library/python/pull/143#issuecomment-241032683
73+
&& pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
74+
# then we use "pip list" to ensure we don't have more than one pip version installed
75+
# https://github.com/docker-library/python/pull/100
7176
&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
7277
\
7378
&& find /usr/local -depth \

3.6/slim/Dockerfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1515
&& rm -rf /var/lib/apt/lists/*
1616

1717
ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D
18-
ENV PYTHON_VERSION 3.6.0a3
18+
ENV PYTHON_VERSION 3.6.0a4
1919

2020
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
2121
ENV PYTHON_PIP_VERSION 8.1.2
@@ -63,7 +63,12 @@ RUN set -ex \
6363
&& python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \
6464
&& rm /tmp/get-pip.py \
6565
; fi \
66-
&& pip3 install --no-cache-dir --upgrade "pip==$PYTHON_PIP_VERSION" \
66+
# we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python
67+
# ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
68+
# https://github.com/docker-library/python/pull/143#issuecomment-241032683
69+
&& pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
70+
# then we use "pip list" to ensure we don't have more than one pip version installed
71+
# https://github.com/docker-library/python/pull/100
6772
&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
6873
\
6974
&& find /usr/local -depth \

3.6/windows/windowsservercore/Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM microsoft/windowsservercore
22

33
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"]
44

5-
ENV PYTHON_VERSION 3.6.0a3
5+
ENV PYTHON_VERSION 3.6.0a4
66
ENV PYTHON_RELEASE 3.6.0
77

88
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
@@ -36,7 +36,10 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env
3636
\
3737
$pipInstall = ('pip=={0}' -f $env:PYTHON_PIP_VERSION); \
3838
Write-Host ('Installing {0} ...' -f $pipInstall); \
39-
pip install --no-cache-dir --upgrade $pipInstall; \
39+
# we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python
40+
# ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
41+
# https://github.com/docker-library/python/pull/143#issuecomment-241032683
42+
pip install --no-cache-dir --upgrade --force-reinstall $pipInstall; \
4043
\
4144
Write-Host 'Verifying pip install ...'; \
4245
pip --version; \

Dockerfile-alpine.template

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,12 @@ RUN set -ex \
6767
&& python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \
6868
&& rm /tmp/get-pip.py \
6969
; fi \
70-
&& pip3 install --no-cache-dir --upgrade "pip==$PYTHON_PIP_VERSION" \
70+
# we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python
71+
# ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
72+
# https://github.com/docker-library/python/pull/143#issuecomment-241032683
73+
&& pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
74+
# then we use "pip list" to ensure we don't have more than one pip version installed
75+
# https://github.com/docker-library/python/pull/100
7176
&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
7277
\
7378
&& find /usr/local -depth \

0 commit comments

Comments
 (0)