File tree 24 files changed +142
-28
lines changed
windows/windowsservercore
windows/windowsservercore 24 files changed +142
-28
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,12 @@ RUN set -ex \
47
47
&& wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \
48
48
&& python2 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \
49
49
&& 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
51
56
&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == " pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
52
57
\
53
58
&& find /usr/local -depth \
Original file line number Diff line number Diff line change @@ -64,7 +64,12 @@ RUN set -ex \
64
64
&& wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \
65
65
&& python2 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \
66
66
&& 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
68
73
&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == " pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
69
74
\
70
75
&& find /usr/local -depth \
Original file line number Diff line number Diff line change @@ -60,7 +60,12 @@ RUN set -ex \
60
60
&& wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \
61
61
&& python2 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \
62
62
&& 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
64
69
&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == " pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
65
70
\
66
71
&& find /usr/local -depth \
Original file line number Diff line number Diff line change @@ -47,7 +47,12 @@ RUN set -ex \
47
47
&& wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \
48
48
&& python2 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \
49
49
&& 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
51
56
&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == " pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
52
57
\
53
58
&& find /usr/local -depth \
Original file line number Diff line number Diff line change @@ -56,7 +56,12 @@ RUN set -ex \
56
56
&& python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \
57
57
&& rm /tmp/get-pip.py \
58
58
; 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
60
65
&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == " pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
61
66
\
62
67
&& find /usr/local -depth \
Original file line number Diff line number Diff line change @@ -73,7 +73,12 @@ RUN set -ex \
73
73
&& python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \
74
74
&& rm /tmp/get-pip.py \
75
75
; 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
77
82
&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == " pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
78
83
\
79
84
&& find /usr/local -depth \
Original file line number Diff line number Diff line change @@ -69,7 +69,12 @@ RUN set -ex \
69
69
&& python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \
70
70
&& rm /tmp/get-pip.py \
71
71
; 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
73
78
&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == " pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
74
79
\
75
80
&& find /usr/local -depth \
Original file line number Diff line number Diff line change @@ -56,7 +56,12 @@ RUN set -ex \
56
56
&& python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \
57
57
&& rm /tmp/get-pip.py \
58
58
; 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
60
65
&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == " pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
61
66
\
62
67
&& find /usr/local -depth \
Original file line number Diff line number Diff line change @@ -56,7 +56,12 @@ RUN set -ex \
56
56
&& python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \
57
57
&& rm /tmp/get-pip.py \
58
58
; 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
60
65
&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == " pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
61
66
\
62
67
&& find /usr/local -depth \
Original file line number Diff line number Diff line change @@ -73,7 +73,12 @@ RUN set -ex \
73
73
&& python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \
74
74
&& rm /tmp/get-pip.py \
75
75
; 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
77
82
&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == " pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
78
83
\
79
84
&& find /usr/local -depth \
Original file line number Diff line number Diff line change @@ -69,7 +69,12 @@ RUN set -ex \
69
69
&& python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \
70
70
&& rm /tmp/get-pip.py \
71
71
; 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
73
78
&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == " pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
74
79
\
75
80
&& find /usr/local -depth \
Original file line number Diff line number Diff line change @@ -56,7 +56,12 @@ RUN set -ex \
56
56
&& python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \
57
57
&& rm /tmp/get-pip.py \
58
58
; 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
60
65
&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == " pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
61
66
\
62
67
&& find /usr/local -depth \
Original file line number Diff line number Diff line change @@ -56,7 +56,12 @@ RUN set -ex \
56
56
&& python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \
57
57
&& rm /tmp/get-pip.py \
58
58
; 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
60
65
&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == " pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
61
66
\
62
67
&& find /usr/local -depth \
Original file line number Diff line number Diff line change @@ -73,7 +73,12 @@ RUN set -ex \
73
73
&& python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \
74
74
&& rm /tmp/get-pip.py \
75
75
; 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
77
82
&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == " pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
78
83
\
79
84
&& find /usr/local -depth \
Original file line number Diff line number Diff line change @@ -69,7 +69,12 @@ RUN set -ex \
69
69
&& python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \
70
70
&& rm /tmp/get-pip.py \
71
71
; 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
73
78
&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == " pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
74
79
\
75
80
&& find /usr/local -depth \
Original file line number Diff line number Diff line change @@ -42,7 +42,10 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env
42
42
\
43
43
$pipInstall = ('pip=={0}' -f $env:PYTHON_PIP_VERSION); \
44
44
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; \
46
49
\
47
50
Write-Host 'Verifying pip install ...' ; \
48
51
pip --version; \
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
14
14
&& rm -rf /var/lib/apt/lists/*
15
15
16
16
ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D
17
- ENV PYTHON_VERSION 3.6.0a3
17
+ ENV PYTHON_VERSION 3.6.0a4
18
18
19
19
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
20
20
ENV PYTHON_PIP_VERSION 8.1.2
@@ -50,7 +50,12 @@ RUN set -ex \
50
50
&& python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \
51
51
&& rm /tmp/get-pip.py \
52
52
; 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
54
59
&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == " pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
55
60
\
56
61
&& find /usr/local -depth \
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ ENV LANG C.UTF-8
12
12
RUN apk add --no-cache ca-certificates
13
13
14
14
ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D
15
- ENV PYTHON_VERSION 3.6.0a3
15
+ ENV PYTHON_VERSION 3.6.0a4
16
16
17
17
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
18
18
ENV PYTHON_PIP_VERSION 8.1.2
@@ -67,7 +67,12 @@ RUN set -ex \
67
67
&& python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \
68
68
&& rm /tmp/get-pip.py \
69
69
; 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
71
76
&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == " pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
72
77
\
73
78
&& find /usr/local -depth \
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
15
15
&& rm -rf /var/lib/apt/lists/*
16
16
17
17
ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D
18
- ENV PYTHON_VERSION 3.6.0a3
18
+ ENV PYTHON_VERSION 3.6.0a4
19
19
20
20
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
21
21
ENV PYTHON_PIP_VERSION 8.1.2
@@ -63,7 +63,12 @@ RUN set -ex \
63
63
&& python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \
64
64
&& rm /tmp/get-pip.py \
65
65
; 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
67
72
&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == " pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
68
73
\
69
74
&& find /usr/local -depth \
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ FROM microsoft/windowsservercore
2
2
3
3
SHELL ["powershell" , "-Command" , "$ErrorActionPreference = 'Stop';" ]
4
4
5
- ENV PYTHON_VERSION 3.6.0a3
5
+ ENV PYTHON_VERSION 3.6.0a4
6
6
ENV PYTHON_RELEASE 3.6.0
7
7
8
8
# 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
36
36
\
37
37
$pipInstall = ('pip=={0}' -f $env:PYTHON_PIP_VERSION); \
38
38
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; \
40
43
\
41
44
Write-Host 'Verifying pip install ...' ; \
42
45
pip --version; \
Original file line number Diff line number Diff line change @@ -67,7 +67,12 @@ RUN set -ex \
67
67
&& python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \
68
68
&& rm /tmp/get-pip.py \
69
69
; 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
71
76
&& [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \
72
77
\
73
78
&& find /usr/local -depth \
You can’t perform that action at this time.
0 commit comments