From 8726813a8930711eb1c05041826793cee1a262d8 Mon Sep 17 00:00:00 2001 From: Kane Date: Sat, 9 Apr 2016 16:28:06 +1000 Subject: [PATCH 1/2] Prevent two versions of pip --- 3.4/Dockerfile | 2 +- 3.4/alpine/Dockerfile | 2 +- 3.4/slim/Dockerfile | 2 +- 3.4/wheezy/Dockerfile | 2 +- 3.5/Dockerfile | 2 +- 3.5/alpine/Dockerfile | 2 +- 3.5/slim/Dockerfile | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/3.4/Dockerfile b/3.4/Dockerfile index 2b12b4c58..832e6e724 100644 --- a/3.4/Dockerfile +++ b/3.4/Dockerfile @@ -31,7 +31,7 @@ RUN set -ex \ && make -j$(nproc) \ && make install \ && ldconfig \ - && pip3 install --no-cache-dir --upgrade --ignore-installed pip==$PYTHON_PIP_VERSION \ + && pip3 install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \ && find /usr/local -depth \ \( \ \( -type d -a -name test -o -name tests \) \ diff --git a/3.4/alpine/Dockerfile b/3.4/alpine/Dockerfile index 9cbbbd00b..10d14aaba 100644 --- a/3.4/alpine/Dockerfile +++ b/3.4/alpine/Dockerfile @@ -43,7 +43,7 @@ RUN set -ex \ && ./configure --enable-shared --enable-unicode=ucs4 \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ - && pip3 install --no-cache-dir --upgrade --ignore-installed pip==$PYTHON_PIP_VERSION \ + && pip3 install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \ && find /usr/local -depth \ \( \ \( -type d -a -name test -o -name tests \) \ diff --git a/3.4/slim/Dockerfile b/3.4/slim/Dockerfile index 21cd9d3f6..cb1a16a88 100644 --- a/3.4/slim/Dockerfile +++ b/3.4/slim/Dockerfile @@ -52,7 +52,7 @@ RUN set -ex \ && make -j$(nproc) \ && make install \ && ldconfig \ - && pip3 install --no-cache-dir --upgrade --ignore-installed pip==$PYTHON_PIP_VERSION \ + && pip3 install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \ && find /usr/local -depth \ \( \ \( -type d -a -name test -o -name tests \) \ diff --git a/3.4/wheezy/Dockerfile b/3.4/wheezy/Dockerfile index f34a2579f..7aa6d71c3 100644 --- a/3.4/wheezy/Dockerfile +++ b/3.4/wheezy/Dockerfile @@ -31,7 +31,7 @@ RUN set -ex \ && make -j$(nproc) \ && make install \ && ldconfig \ - && pip3 install --no-cache-dir --upgrade --ignore-installed pip==$PYTHON_PIP_VERSION \ + && pip3 install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \ && find /usr/local -depth \ \( \ \( -type d -a -name test -o -name tests \) \ diff --git a/3.5/Dockerfile b/3.5/Dockerfile index fc2c223e6..6a6e04b90 100644 --- a/3.5/Dockerfile +++ b/3.5/Dockerfile @@ -31,7 +31,7 @@ RUN set -ex \ && make -j$(nproc) \ && make install \ && ldconfig \ - && pip3 install --no-cache-dir --upgrade --ignore-installed pip==$PYTHON_PIP_VERSION \ + && pip3 install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \ && find /usr/local -depth \ \( \ \( -type d -a -name test -o -name tests \) \ diff --git a/3.5/alpine/Dockerfile b/3.5/alpine/Dockerfile index 764b121d3..7d300f33a 100644 --- a/3.5/alpine/Dockerfile +++ b/3.5/alpine/Dockerfile @@ -43,7 +43,7 @@ RUN set -ex \ && ./configure --enable-shared --enable-unicode=ucs4 \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ - && pip3 install --no-cache-dir --upgrade --ignore-installed pip==$PYTHON_PIP_VERSION \ + && pip3 install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \ && find /usr/local -depth \ \( \ \( -type d -a -name test -o -name tests \) \ diff --git a/3.5/slim/Dockerfile b/3.5/slim/Dockerfile index 537ed1416..3e57b4d1e 100644 --- a/3.5/slim/Dockerfile +++ b/3.5/slim/Dockerfile @@ -52,7 +52,7 @@ RUN set -ex \ && make -j$(nproc) \ && make install \ && ldconfig \ - && pip3 install --no-cache-dir --upgrade --ignore-installed pip==$PYTHON_PIP_VERSION \ + && pip3 install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \ && find /usr/local -depth \ \( \ \( -type d -a -name test -o -name tests \) \ From 682708e7866caccd3f476f1d30ca60c0851249e1 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 28 Jun 2016 15:24:40 -0700 Subject: [PATCH 2/2] Add a small test to ensure that the pip version we installed is the pip we got See https://github.com/docker-library/python/issues/118 for context. --- 2.7/Dockerfile | 1 + 2.7/alpine/Dockerfile | 1 + 2.7/slim/Dockerfile | 1 + 2.7/wheezy/Dockerfile | 1 + 3.3/Dockerfile | 1 + 3.3/alpine/Dockerfile | 1 + 3.3/slim/Dockerfile | 1 + 3.3/wheezy/Dockerfile | 1 + 3.4/Dockerfile | 1 + 3.4/alpine/Dockerfile | 1 + 3.4/slim/Dockerfile | 1 + 3.4/wheezy/Dockerfile | 1 + 3.5/Dockerfile | 1 + 3.5/alpine/Dockerfile | 1 + 3.5/slim/Dockerfile | 1 + 15 files changed, 15 insertions(+) diff --git a/2.7/Dockerfile b/2.7/Dockerfile index 05d9f306b..8b8b9a44f 100644 --- a/2.7/Dockerfile +++ b/2.7/Dockerfile @@ -33,6 +33,7 @@ RUN set -ex \ && ldconfig \ && curl -fSL 'https://bootstrap.pypa.io/get-pip.py' | python2 \ && pip install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \ + && [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ && find /usr/local -depth \ \( \ \( -type d -a -name test -o -name tests \) \ diff --git a/2.7/alpine/Dockerfile b/2.7/alpine/Dockerfile index 164ad0bbb..f834cfe36 100644 --- a/2.7/alpine/Dockerfile +++ b/2.7/alpine/Dockerfile @@ -43,6 +43,7 @@ RUN set -ex \ && make install \ && curl -fSL 'https://bootstrap.pypa.io/get-pip.py' | python2 \ && pip install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \ + && [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ && find /usr/local -depth \ \( \ \( -type d -a -name test -o -name tests \) \ diff --git a/2.7/slim/Dockerfile b/2.7/slim/Dockerfile index c4494f2df..db6b006ff 100644 --- a/2.7/slim/Dockerfile +++ b/2.7/slim/Dockerfile @@ -53,6 +53,7 @@ RUN set -ex \ && ldconfig \ && curl -fSL 'https://bootstrap.pypa.io/get-pip.py' | python2 \ && pip install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \ + && [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ && find /usr/local -depth \ \( \ \( -type d -a -name test -o -name tests \) \ diff --git a/2.7/wheezy/Dockerfile b/2.7/wheezy/Dockerfile index dde6be53c..57464a0a8 100644 --- a/2.7/wheezy/Dockerfile +++ b/2.7/wheezy/Dockerfile @@ -33,6 +33,7 @@ RUN set -ex \ && ldconfig \ && curl -fSL 'https://bootstrap.pypa.io/get-pip.py' | python2 \ && pip install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \ + && [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ && find /usr/local -depth \ \( \ \( -type d -a -name test -o -name tests \) \ diff --git a/3.3/Dockerfile b/3.3/Dockerfile index a99bb616f..157dc24f9 100644 --- a/3.3/Dockerfile +++ b/3.3/Dockerfile @@ -33,6 +33,7 @@ RUN set -ex \ && ldconfig \ && curl -fSL 'https://bootstrap.pypa.io/get-pip.py' | python3 \ && pip install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \ + && [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ && find /usr/local -depth \ \( \ \( -type d -a -name test -o -name tests \) \ diff --git a/3.3/alpine/Dockerfile b/3.3/alpine/Dockerfile index b3d7fe76e..50b63a0f3 100644 --- a/3.3/alpine/Dockerfile +++ b/3.3/alpine/Dockerfile @@ -44,6 +44,7 @@ RUN set -ex \ && make install \ && curl -fSL 'https://bootstrap.pypa.io/get-pip.py' | python3 \ && pip install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \ + && [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ && find /usr/local -depth \ \( \ \( -type d -a -name test -o -name tests \) \ diff --git a/3.3/slim/Dockerfile b/3.3/slim/Dockerfile index e59b3d148..263c7ac5d 100644 --- a/3.3/slim/Dockerfile +++ b/3.3/slim/Dockerfile @@ -54,6 +54,7 @@ RUN set -ex \ && ldconfig \ && curl -fSL 'https://bootstrap.pypa.io/get-pip.py' | python3 \ && pip install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \ + && [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ && find /usr/local -depth \ \( \ \( -type d -a -name test -o -name tests \) \ diff --git a/3.3/wheezy/Dockerfile b/3.3/wheezy/Dockerfile index bd9c33b13..c79288798 100644 --- a/3.3/wheezy/Dockerfile +++ b/3.3/wheezy/Dockerfile @@ -33,6 +33,7 @@ RUN set -ex \ && ldconfig \ && curl -fSL 'https://bootstrap.pypa.io/get-pip.py' | python3 \ && pip install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \ + && [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ && find /usr/local -depth \ \( \ \( -type d -a -name test -o -name tests \) \ diff --git a/3.4/Dockerfile b/3.4/Dockerfile index 832e6e724..4f5d65d3f 100644 --- a/3.4/Dockerfile +++ b/3.4/Dockerfile @@ -32,6 +32,7 @@ RUN set -ex \ && make install \ && ldconfig \ && pip3 install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \ + && [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ && find /usr/local -depth \ \( \ \( -type d -a -name test -o -name tests \) \ diff --git a/3.4/alpine/Dockerfile b/3.4/alpine/Dockerfile index 10d14aaba..8736bd733 100644 --- a/3.4/alpine/Dockerfile +++ b/3.4/alpine/Dockerfile @@ -44,6 +44,7 @@ RUN set -ex \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ && pip3 install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \ + && [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ && find /usr/local -depth \ \( \ \( -type d -a -name test -o -name tests \) \ diff --git a/3.4/slim/Dockerfile b/3.4/slim/Dockerfile index cb1a16a88..dcca4534a 100644 --- a/3.4/slim/Dockerfile +++ b/3.4/slim/Dockerfile @@ -53,6 +53,7 @@ RUN set -ex \ && make install \ && ldconfig \ && pip3 install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \ + && [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ && find /usr/local -depth \ \( \ \( -type d -a -name test -o -name tests \) \ diff --git a/3.4/wheezy/Dockerfile b/3.4/wheezy/Dockerfile index 7aa6d71c3..c668d32a3 100644 --- a/3.4/wheezy/Dockerfile +++ b/3.4/wheezy/Dockerfile @@ -32,6 +32,7 @@ RUN set -ex \ && make install \ && ldconfig \ && pip3 install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \ + && [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ && find /usr/local -depth \ \( \ \( -type d -a -name test -o -name tests \) \ diff --git a/3.5/Dockerfile b/3.5/Dockerfile index 6a6e04b90..ceb718838 100644 --- a/3.5/Dockerfile +++ b/3.5/Dockerfile @@ -32,6 +32,7 @@ RUN set -ex \ && make install \ && ldconfig \ && pip3 install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \ + && [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ && find /usr/local -depth \ \( \ \( -type d -a -name test -o -name tests \) \ diff --git a/3.5/alpine/Dockerfile b/3.5/alpine/Dockerfile index 7d300f33a..41b9fe215 100644 --- a/3.5/alpine/Dockerfile +++ b/3.5/alpine/Dockerfile @@ -44,6 +44,7 @@ RUN set -ex \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ && pip3 install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \ + && [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ && find /usr/local -depth \ \( \ \( -type d -a -name test -o -name tests \) \ diff --git a/3.5/slim/Dockerfile b/3.5/slim/Dockerfile index 3e57b4d1e..539a16d93 100644 --- a/3.5/slim/Dockerfile +++ b/3.5/slim/Dockerfile @@ -53,6 +53,7 @@ RUN set -ex \ && make install \ && ldconfig \ && pip3 install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \ + && [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ && find /usr/local -depth \ \( \ \( -type d -a -name test -o -name tests \) \