From 2c24d1240535a622158e3342cf3c03060aa51e9e Mon Sep 17 00:00:00 2001 From: Mal Graty Date: Tue, 4 Apr 2017 00:26:18 +0100 Subject: [PATCH 1/4] Explicitly version setuptools and wheel --- Dockerfile-alpine.template | 7 ++++++- Dockerfile-debian.template | 7 ++++++- Dockerfile-slim.template | 7 ++++++- update.sh | 6 +++++- 4 files changed, 23 insertions(+), 4 deletions(-) diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index 6b9c054e9..b1bc3b0aa 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -16,6 +16,8 @@ ENV PYTHON_VERSION %%PLACEHOLDER%% # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION %%PLACEHOLDER%% +ENV PYTHON_SETUPTOOLS_VERSION %%PLACEHOLDER%% +ENV PYTHON_WHEEL_VERSION %%PLACEHOLDER%% RUN set -ex \ && apk add --no-cache --virtual .fetch-deps \ @@ -71,7 +73,10 @@ RUN set -ex \ # 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 # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages") # https://github.com/docker-library/python/pull/143#issuecomment-241032683 - && pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \ + && pip3 install --no-cache-dir --upgrade --force-reinstall \ + "pip==$PYTHON_PIP_VERSION" \ + "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ + "wheel==$PYTHON_WHEEL_VERSION" \ \ && find /usr/local -depth \ \( \ diff --git a/Dockerfile-debian.template b/Dockerfile-debian.template index 8c8c33bd5..e9562fb91 100644 --- a/Dockerfile-debian.template +++ b/Dockerfile-debian.template @@ -18,6 +18,8 @@ ENV PYTHON_VERSION %%PLACEHOLDER%% # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION %%PLACEHOLDER%% +ENV PYTHON_SETUPTOOLS_VERSION %%PLACEHOLDER%% +ENV PYTHON_WHEEL_VERSION %%PLACEHOLDER%% RUN set -ex \ && buildDeps=' \ @@ -53,7 +55,10 @@ RUN set -ex \ # 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 # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages") # https://github.com/docker-library/python/pull/143#issuecomment-241032683 - && pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \ + && pip3 install --no-cache-dir --upgrade --force-reinstall \ + "pip==$PYTHON_PIP_VERSION" \ + "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ + "wheel==$PYTHON_WHEEL_VERSION" \ \ && find /usr/local -depth \ \( \ diff --git a/Dockerfile-slim.template b/Dockerfile-slim.template index 3bbaa7cee..28cd63c68 100644 --- a/Dockerfile-slim.template +++ b/Dockerfile-slim.template @@ -20,6 +20,8 @@ ENV PYTHON_VERSION %%PLACEHOLDER%% # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION %%PLACEHOLDER%% +ENV PYTHON_SETUPTOOLS_VERSION %%PLACEHOLDER%% +ENV PYTHON_WHEEL_VERSION %%PLACEHOLDER%% RUN set -ex \ && buildDeps=' \ @@ -68,7 +70,10 @@ RUN set -ex \ # 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 # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages") # https://github.com/docker-library/python/pull/143#issuecomment-241032683 - && pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \ + && pip3 install --no-cache-dir --upgrade --force-reinstall \ + "pip==$PYTHON_PIP_VERSION" \ + "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ + "wheel==$PYTHON_WHEEL_VERSION" \ \ && find /usr/local -depth \ \( \ diff --git a/update.sh b/update.sh index 49d9a9fe8..faa8983ea 100755 --- a/update.sh +++ b/update.sh @@ -32,7 +32,9 @@ if [ ${#versions[@]} -eq 0 ]; then fi versions=( "${versions[@]%/}" ) -pipVersion="$(curl -fsSL 'https://pypi.python.org/pypi/pip/json' | awk -F '"' '$2 == "version" { print $4 }')" +pipVersion="$(curl -fsSL 'https://pypi.org/pypi/pip/json' | jq -r .info.version)" +setuptoolsVersion="$(curl -fsSL 'https://pypi.org/pypi/setuptools/json' | jq -r .info.version)" +wheelVersion="$(curl -fsSL 'https://pypi.org/pypi/wheel/json' | jq -r .info.version)" generated_warning() { cat <<-EOH @@ -103,6 +105,8 @@ for version in "${versions[@]}"; do -e 's/^(ENV PYTHON_VERSION) .*/\1 '"$fullVersion"'/' \ -e 's/^(ENV PYTHON_RELEASE) .*/\1 '"${fullVersion%%[a-z]*}"'/' \ -e 's/^(ENV PYTHON_PIP_VERSION) .*/\1 '"$pipVersion"'/' \ + -e 's/^(ENV PYTHON_SETUPTOOLS_VERSION) .*/\1 '"$setuptoolsVersion"'/' \ + -e 's/^(ENV PYTHON_WHEEL_VERSION) .*/\1 '"$wheelVersion"'/' \ -e 's/^(FROM python):.*/\1:'"$version"'/' \ "$version"/{,*/,*/*/}Dockerfile ) From dc016eb55d86dd6e23ec5ee2a537ee60ab11c795 Mon Sep 17 00:00:00 2001 From: Mal Graty Date: Fri, 7 Apr 2017 21:05:20 +0100 Subject: [PATCH 2/4] Run update.sh --- 3.3/Dockerfile | 7 ++++++- 3.3/alpine/Dockerfile | 7 ++++++- 3.3/slim/Dockerfile | 7 ++++++- 3.3/wheezy/Dockerfile | 7 ++++++- 3.4/Dockerfile | 7 ++++++- 3.4/alpine/Dockerfile | 7 ++++++- 3.4/slim/Dockerfile | 7 ++++++- 3.4/wheezy/Dockerfile | 7 ++++++- 3.5/Dockerfile | 7 ++++++- 3.5/alpine/Dockerfile | 7 ++++++- 3.5/slim/Dockerfile | 7 ++++++- 3.6/Dockerfile | 7 ++++++- 3.6/alpine/Dockerfile | 7 ++++++- 3.6/slim/Dockerfile | 7 ++++++- 14 files changed, 84 insertions(+), 14 deletions(-) diff --git a/3.3/Dockerfile b/3.3/Dockerfile index 55a6506a7..bc0e26de2 100644 --- a/3.3/Dockerfile +++ b/3.3/Dockerfile @@ -24,6 +24,8 @@ ENV PYTHON_VERSION 3.3.6 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 9.0.1 +ENV PYTHON_SETUPTOOLS_VERSION 35.0.1 +ENV PYTHON_WHEEL_VERSION 0.29.0 RUN set -ex \ && buildDeps=' \ @@ -59,7 +61,10 @@ RUN set -ex \ # 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 # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages") # https://github.com/docker-library/python/pull/143#issuecomment-241032683 - && pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \ + && pip3 install --no-cache-dir --upgrade --force-reinstall \ + "pip==$PYTHON_PIP_VERSION" \ + "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ + "wheel==$PYTHON_WHEEL_VERSION" \ \ && find /usr/local -depth \ \( \ diff --git a/3.3/alpine/Dockerfile b/3.3/alpine/Dockerfile index 6b6c9776d..ddd987ee8 100644 --- a/3.3/alpine/Dockerfile +++ b/3.3/alpine/Dockerfile @@ -22,6 +22,8 @@ ENV PYTHON_VERSION 3.3.6 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 9.0.1 +ENV PYTHON_SETUPTOOLS_VERSION 35.0.1 +ENV PYTHON_WHEEL_VERSION 0.29.0 RUN set -ex \ && apk add --no-cache --virtual .fetch-deps \ @@ -77,7 +79,10 @@ RUN set -ex \ # 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 # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages") # https://github.com/docker-library/python/pull/143#issuecomment-241032683 - && pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \ + && pip3 install --no-cache-dir --upgrade --force-reinstall \ + "pip==$PYTHON_PIP_VERSION" \ + "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ + "wheel==$PYTHON_WHEEL_VERSION" \ \ && find /usr/local -depth \ \( \ diff --git a/3.3/slim/Dockerfile b/3.3/slim/Dockerfile index 3c72d9a51..fbce370ed 100644 --- a/3.3/slim/Dockerfile +++ b/3.3/slim/Dockerfile @@ -26,6 +26,8 @@ ENV PYTHON_VERSION 3.3.6 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 9.0.1 +ENV PYTHON_SETUPTOOLS_VERSION 35.0.1 +ENV PYTHON_WHEEL_VERSION 0.29.0 RUN set -ex \ && buildDeps=' \ @@ -74,7 +76,10 @@ RUN set -ex \ # 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 # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages") # https://github.com/docker-library/python/pull/143#issuecomment-241032683 - && pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \ + && pip3 install --no-cache-dir --upgrade --force-reinstall \ + "pip==$PYTHON_PIP_VERSION" \ + "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ + "wheel==$PYTHON_WHEEL_VERSION" \ \ && find /usr/local -depth \ \( \ diff --git a/3.3/wheezy/Dockerfile b/3.3/wheezy/Dockerfile index 4fdada3c2..bcc85fe42 100644 --- a/3.3/wheezy/Dockerfile +++ b/3.3/wheezy/Dockerfile @@ -24,6 +24,8 @@ ENV PYTHON_VERSION 3.3.6 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 9.0.1 +ENV PYTHON_SETUPTOOLS_VERSION 35.0.1 +ENV PYTHON_WHEEL_VERSION 0.29.0 RUN set -ex \ && buildDeps=' \ @@ -59,7 +61,10 @@ RUN set -ex \ # 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 # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages") # https://github.com/docker-library/python/pull/143#issuecomment-241032683 - && pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \ + && pip3 install --no-cache-dir --upgrade --force-reinstall \ + "pip==$PYTHON_PIP_VERSION" \ + "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ + "wheel==$PYTHON_WHEEL_VERSION" \ \ && find /usr/local -depth \ \( \ diff --git a/3.4/Dockerfile b/3.4/Dockerfile index d6888f19b..550de6511 100644 --- a/3.4/Dockerfile +++ b/3.4/Dockerfile @@ -24,6 +24,8 @@ ENV PYTHON_VERSION 3.4.6 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 9.0.1 +ENV PYTHON_SETUPTOOLS_VERSION 35.0.1 +ENV PYTHON_WHEEL_VERSION 0.29.0 RUN set -ex \ && buildDeps=' \ @@ -59,7 +61,10 @@ RUN set -ex \ # 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 # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages") # https://github.com/docker-library/python/pull/143#issuecomment-241032683 - && pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \ + && pip3 install --no-cache-dir --upgrade --force-reinstall \ + "pip==$PYTHON_PIP_VERSION" \ + "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ + "wheel==$PYTHON_WHEEL_VERSION" \ \ && find /usr/local -depth \ \( \ diff --git a/3.4/alpine/Dockerfile b/3.4/alpine/Dockerfile index a0438dc6d..2fec56ffd 100644 --- a/3.4/alpine/Dockerfile +++ b/3.4/alpine/Dockerfile @@ -22,6 +22,8 @@ ENV PYTHON_VERSION 3.4.6 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 9.0.1 +ENV PYTHON_SETUPTOOLS_VERSION 35.0.1 +ENV PYTHON_WHEEL_VERSION 0.29.0 RUN set -ex \ && apk add --no-cache --virtual .fetch-deps \ @@ -77,7 +79,10 @@ RUN set -ex \ # 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 # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages") # https://github.com/docker-library/python/pull/143#issuecomment-241032683 - && pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \ + && pip3 install --no-cache-dir --upgrade --force-reinstall \ + "pip==$PYTHON_PIP_VERSION" \ + "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ + "wheel==$PYTHON_WHEEL_VERSION" \ \ && find /usr/local -depth \ \( \ diff --git a/3.4/slim/Dockerfile b/3.4/slim/Dockerfile index df4632c31..20de5ef2b 100644 --- a/3.4/slim/Dockerfile +++ b/3.4/slim/Dockerfile @@ -26,6 +26,8 @@ ENV PYTHON_VERSION 3.4.6 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 9.0.1 +ENV PYTHON_SETUPTOOLS_VERSION 35.0.1 +ENV PYTHON_WHEEL_VERSION 0.29.0 RUN set -ex \ && buildDeps=' \ @@ -74,7 +76,10 @@ RUN set -ex \ # 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 # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages") # https://github.com/docker-library/python/pull/143#issuecomment-241032683 - && pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \ + && pip3 install --no-cache-dir --upgrade --force-reinstall \ + "pip==$PYTHON_PIP_VERSION" \ + "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ + "wheel==$PYTHON_WHEEL_VERSION" \ \ && find /usr/local -depth \ \( \ diff --git a/3.4/wheezy/Dockerfile b/3.4/wheezy/Dockerfile index ad2f99620..317b636d7 100644 --- a/3.4/wheezy/Dockerfile +++ b/3.4/wheezy/Dockerfile @@ -24,6 +24,8 @@ ENV PYTHON_VERSION 3.4.6 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 9.0.1 +ENV PYTHON_SETUPTOOLS_VERSION 35.0.1 +ENV PYTHON_WHEEL_VERSION 0.29.0 RUN set -ex \ && buildDeps=' \ @@ -59,7 +61,10 @@ RUN set -ex \ # 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 # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages") # https://github.com/docker-library/python/pull/143#issuecomment-241032683 - && pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \ + && pip3 install --no-cache-dir --upgrade --force-reinstall \ + "pip==$PYTHON_PIP_VERSION" \ + "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ + "wheel==$PYTHON_WHEEL_VERSION" \ \ && find /usr/local -depth \ \( \ diff --git a/3.5/Dockerfile b/3.5/Dockerfile index c609a9749..355f4d4f0 100644 --- a/3.5/Dockerfile +++ b/3.5/Dockerfile @@ -24,6 +24,8 @@ ENV PYTHON_VERSION 3.5.3 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 9.0.1 +ENV PYTHON_SETUPTOOLS_VERSION 35.0.1 +ENV PYTHON_WHEEL_VERSION 0.29.0 RUN set -ex \ && buildDeps=' \ @@ -59,7 +61,10 @@ RUN set -ex \ # 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 # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages") # https://github.com/docker-library/python/pull/143#issuecomment-241032683 - && pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \ + && pip3 install --no-cache-dir --upgrade --force-reinstall \ + "pip==$PYTHON_PIP_VERSION" \ + "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ + "wheel==$PYTHON_WHEEL_VERSION" \ \ && find /usr/local -depth \ \( \ diff --git a/3.5/alpine/Dockerfile b/3.5/alpine/Dockerfile index a222912b0..ffdb938cb 100644 --- a/3.5/alpine/Dockerfile +++ b/3.5/alpine/Dockerfile @@ -22,6 +22,8 @@ ENV PYTHON_VERSION 3.5.3 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 9.0.1 +ENV PYTHON_SETUPTOOLS_VERSION 35.0.1 +ENV PYTHON_WHEEL_VERSION 0.29.0 RUN set -ex \ && apk add --no-cache --virtual .fetch-deps \ @@ -77,7 +79,10 @@ RUN set -ex \ # 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 # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages") # https://github.com/docker-library/python/pull/143#issuecomment-241032683 - && pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \ + && pip3 install --no-cache-dir --upgrade --force-reinstall \ + "pip==$PYTHON_PIP_VERSION" \ + "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ + "wheel==$PYTHON_WHEEL_VERSION" \ \ && find /usr/local -depth \ \( \ diff --git a/3.5/slim/Dockerfile b/3.5/slim/Dockerfile index 0cc038e33..56bec6222 100644 --- a/3.5/slim/Dockerfile +++ b/3.5/slim/Dockerfile @@ -26,6 +26,8 @@ ENV PYTHON_VERSION 3.5.3 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 9.0.1 +ENV PYTHON_SETUPTOOLS_VERSION 35.0.1 +ENV PYTHON_WHEEL_VERSION 0.29.0 RUN set -ex \ && buildDeps=' \ @@ -74,7 +76,10 @@ RUN set -ex \ # 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 # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages") # https://github.com/docker-library/python/pull/143#issuecomment-241032683 - && pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \ + && pip3 install --no-cache-dir --upgrade --force-reinstall \ + "pip==$PYTHON_PIP_VERSION" \ + "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ + "wheel==$PYTHON_WHEEL_VERSION" \ \ && find /usr/local -depth \ \( \ diff --git a/3.6/Dockerfile b/3.6/Dockerfile index 3dd6eef4f..e301557cc 100644 --- a/3.6/Dockerfile +++ b/3.6/Dockerfile @@ -24,6 +24,8 @@ ENV PYTHON_VERSION 3.6.1 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 9.0.1 +ENV PYTHON_SETUPTOOLS_VERSION 35.0.1 +ENV PYTHON_WHEEL_VERSION 0.29.0 RUN set -ex \ && buildDeps=' \ @@ -59,7 +61,10 @@ RUN set -ex \ # 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 # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages") # https://github.com/docker-library/python/pull/143#issuecomment-241032683 - && pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \ + && pip3 install --no-cache-dir --upgrade --force-reinstall \ + "pip==$PYTHON_PIP_VERSION" \ + "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ + "wheel==$PYTHON_WHEEL_VERSION" \ \ && find /usr/local -depth \ \( \ diff --git a/3.6/alpine/Dockerfile b/3.6/alpine/Dockerfile index e099c50bf..8dfef23c7 100644 --- a/3.6/alpine/Dockerfile +++ b/3.6/alpine/Dockerfile @@ -22,6 +22,8 @@ ENV PYTHON_VERSION 3.6.1 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 9.0.1 +ENV PYTHON_SETUPTOOLS_VERSION 35.0.1 +ENV PYTHON_WHEEL_VERSION 0.29.0 RUN set -ex \ && apk add --no-cache --virtual .fetch-deps \ @@ -77,7 +79,10 @@ RUN set -ex \ # 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 # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages") # https://github.com/docker-library/python/pull/143#issuecomment-241032683 - && pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \ + && pip3 install --no-cache-dir --upgrade --force-reinstall \ + "pip==$PYTHON_PIP_VERSION" \ + "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ + "wheel==$PYTHON_WHEEL_VERSION" \ \ && find /usr/local -depth \ \( \ diff --git a/3.6/slim/Dockerfile b/3.6/slim/Dockerfile index bb1ed167e..fcdb9df55 100644 --- a/3.6/slim/Dockerfile +++ b/3.6/slim/Dockerfile @@ -26,6 +26,8 @@ ENV PYTHON_VERSION 3.6.1 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 9.0.1 +ENV PYTHON_SETUPTOOLS_VERSION 35.0.1 +ENV PYTHON_WHEEL_VERSION 0.29.0 RUN set -ex \ && buildDeps=' \ @@ -74,7 +76,10 @@ RUN set -ex \ # 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 # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages") # https://github.com/docker-library/python/pull/143#issuecomment-241032683 - && pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \ + && pip3 install --no-cache-dir --upgrade --force-reinstall \ + "pip==$PYTHON_PIP_VERSION" \ + "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ + "wheel==$PYTHON_WHEEL_VERSION" \ \ && find /usr/local -depth \ \( \ From 05db1fffa8c302b1f94cf39a9d446be285e39668 Mon Sep 17 00:00:00 2001 From: Mal Graty Date: Fri, 7 Apr 2017 21:09:53 +0100 Subject: [PATCH 3/4] Update 2.7 manually --- 2.7/Dockerfile | 7 ++++++- 2.7/alpine/Dockerfile | 7 ++++++- 2.7/slim/Dockerfile | 7 ++++++- 2.7/wheezy/Dockerfile | 7 ++++++- 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/2.7/Dockerfile b/2.7/Dockerfile index d14992ff6..a9ef20dfe 100644 --- a/2.7/Dockerfile +++ b/2.7/Dockerfile @@ -18,6 +18,8 @@ ENV PYTHON_VERSION 2.7.13 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 9.0.1 +ENV PYTHON_SETUPTOOLS_VERSION 35.0.1 +ENV PYTHON_WHEEL_VERSION 0.29.0 RUN set -ex \ && buildDeps=' \ @@ -50,7 +52,10 @@ RUN set -ex \ # 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 # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages") # https://github.com/docker-library/python/pull/143#issuecomment-241032683 - && pip install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \ + && pip install --no-cache-dir --upgrade --force-reinstall \ + "pip==$PYTHON_PIP_VERSION" \ + "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ + "wheel==$PYTHON_WHEEL_VERSION" \ \ && find /usr/local -depth \ \( \ diff --git a/2.7/alpine/Dockerfile b/2.7/alpine/Dockerfile index 1fe9b78f2..d4e82c6d4 100644 --- a/2.7/alpine/Dockerfile +++ b/2.7/alpine/Dockerfile @@ -16,6 +16,8 @@ ENV PYTHON_VERSION 2.7.13 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 9.0.1 +ENV PYTHON_SETUPTOOLS_VERSION 35.0.1 +ENV PYTHON_WHEEL_VERSION 0.29.0 RUN set -ex \ && apk add --no-cache --virtual .fetch-deps \ @@ -67,7 +69,10 @@ RUN set -ex \ # 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 # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages") # https://github.com/docker-library/python/pull/143#issuecomment-241032683 - && pip install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \ + && pip install --no-cache-dir --upgrade --force-reinstall \ + "pip==$PYTHON_PIP_VERSION" \ + "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ + "wheel==$PYTHON_WHEEL_VERSION" \ \ && find /usr/local -depth \ \( \ diff --git a/2.7/slim/Dockerfile b/2.7/slim/Dockerfile index 5b43628b8..423b49892 100644 --- a/2.7/slim/Dockerfile +++ b/2.7/slim/Dockerfile @@ -20,6 +20,8 @@ ENV PYTHON_VERSION 2.7.13 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 9.0.1 +ENV PYTHON_SETUPTOOLS_VERSION 35.0.1 +ENV PYTHON_WHEEL_VERSION 0.29.0 RUN set -ex \ && buildDeps=' \ @@ -65,7 +67,10 @@ RUN set -ex \ # 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 # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages") # https://github.com/docker-library/python/pull/143#issuecomment-241032683 - && pip install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \ + && pip install --no-cache-dir --upgrade --force-reinstall \ + "pip==$PYTHON_PIP_VERSION" \ + "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ + "wheel==$PYTHON_WHEEL_VERSION" \ \ && find /usr/local -depth \ \( \ diff --git a/2.7/wheezy/Dockerfile b/2.7/wheezy/Dockerfile index f6cbda7a1..b84805d47 100644 --- a/2.7/wheezy/Dockerfile +++ b/2.7/wheezy/Dockerfile @@ -18,6 +18,8 @@ ENV PYTHON_VERSION 2.7.13 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 9.0.1 +ENV PYTHON_SETUPTOOLS_VERSION 35.0.1 +ENV PYTHON_WHEEL_VERSION 0.29.0 RUN set -ex \ && buildDeps=' \ @@ -50,7 +52,10 @@ RUN set -ex \ # 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 # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages") # https://github.com/docker-library/python/pull/143#issuecomment-241032683 - && pip install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \ + && pip install --no-cache-dir --upgrade --force-reinstall \ + "pip==$PYTHON_PIP_VERSION" \ + "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ + "wheel==$PYTHON_WHEEL_VERSION" \ \ && find /usr/local -depth \ \( \ From 60d03bd670bb9956b9c62a1004640e88669c301c Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 25 Apr 2017 15:32:42 -0700 Subject: [PATCH 4/4] Fix "pip" installation/upgrade on Windows and apply the same setuptools/wheel behavior there --- 3.5/windows/windowsservercore/Dockerfile | 12 +++++++++--- 3.6/windows/windowsservercore/Dockerfile | 12 +++++++++--- Dockerfile-windowsservercore.template | 12 +++++++++--- 3 files changed, 27 insertions(+), 9 deletions(-) diff --git a/3.5/windows/windowsservercore/Dockerfile b/3.5/windows/windowsservercore/Dockerfile index b15fbeda4..2859fd0af 100644 --- a/3.5/windows/windowsservercore/Dockerfile +++ b/3.5/windows/windowsservercore/Dockerfile @@ -13,6 +13,8 @@ ENV PYTHON_RELEASE 3.5.3 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 9.0.1 +ENV PYTHON_SETUPTOOLS_VERSION 35.0.1 +ENV PYTHON_WHEEL_VERSION 0.29.0 RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env:PYTHON_RELEASE, $env:PYTHON_VERSION); \ Write-Host ('Downloading {0} ...' -f $url); \ @@ -40,12 +42,16 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env Write-Host 'Removing ...'; \ Remove-Item python.exe -Force; \ \ - $pipInstall = ('pip=={0}' -f $env:PYTHON_PIP_VERSION); \ - Write-Host ('Installing {0} ...' -f $pipInstall); \ + Write-Host ('Installing pip=={0} ...' -f $env:PYTHON_PIP_VERSION); \ # 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 # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages") # https://github.com/docker-library/python/pull/143#issuecomment-241032683 - pip install --no-cache-dir --upgrade --force-reinstall $pipInstall; \ +# (using "python -m pip" instead of "pip" to avoid pip trying to remove itself while it's running; see also https://pip.readthedocs.io/en/stable/installing/#id6) + python -m pip install --no-cache-dir --upgrade --force-reinstall \ + ('pip=={0}' -f $env:PYTHON_PIP_VERSION) \ + ('setuptools=={0}' -f $env:PYTHON_SETUPTOOLS_VERSION) \ + ('wheel=={0}' -f $env:PYTHON_WHEEL_VERSION) \ + ; \ \ Write-Host 'Verifying pip install ...'; \ pip --version; \ diff --git a/3.6/windows/windowsservercore/Dockerfile b/3.6/windows/windowsservercore/Dockerfile index ae508b116..00c827d3d 100644 --- a/3.6/windows/windowsservercore/Dockerfile +++ b/3.6/windows/windowsservercore/Dockerfile @@ -13,6 +13,8 @@ ENV PYTHON_RELEASE 3.6.1 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 9.0.1 +ENV PYTHON_SETUPTOOLS_VERSION 35.0.1 +ENV PYTHON_WHEEL_VERSION 0.29.0 RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env:PYTHON_RELEASE, $env:PYTHON_VERSION); \ Write-Host ('Downloading {0} ...' -f $url); \ @@ -40,12 +42,16 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env Write-Host 'Removing ...'; \ Remove-Item python.exe -Force; \ \ - $pipInstall = ('pip=={0}' -f $env:PYTHON_PIP_VERSION); \ - Write-Host ('Installing {0} ...' -f $pipInstall); \ + Write-Host ('Installing pip=={0} ...' -f $env:PYTHON_PIP_VERSION); \ # 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 # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages") # https://github.com/docker-library/python/pull/143#issuecomment-241032683 - pip install --no-cache-dir --upgrade --force-reinstall $pipInstall; \ +# (using "python -m pip" instead of "pip" to avoid pip trying to remove itself while it's running; see also https://pip.readthedocs.io/en/stable/installing/#id6) + python -m pip install --no-cache-dir --upgrade --force-reinstall \ + ('pip=={0}' -f $env:PYTHON_PIP_VERSION) \ + ('setuptools=={0}' -f $env:PYTHON_SETUPTOOLS_VERSION) \ + ('wheel=={0}' -f $env:PYTHON_WHEEL_VERSION) \ + ; \ \ Write-Host 'Verifying pip install ...'; \ pip --version; \ diff --git a/Dockerfile-windowsservercore.template b/Dockerfile-windowsservercore.template index 01d1a8c36..18d936df0 100644 --- a/Dockerfile-windowsservercore.template +++ b/Dockerfile-windowsservercore.template @@ -7,6 +7,8 @@ ENV PYTHON_RELEASE %%PLACEHOLDER%% # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION %%PLACEHOLDER%% +ENV PYTHON_SETUPTOOLS_VERSION %%PLACEHOLDER%% +ENV PYTHON_WHEEL_VERSION %%PLACEHOLDER%% RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env:PYTHON_RELEASE, $env:PYTHON_VERSION); \ Write-Host ('Downloading {0} ...' -f $url); \ @@ -34,12 +36,16 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env Write-Host 'Removing ...'; \ Remove-Item python.exe -Force; \ \ - $pipInstall = ('pip=={0}' -f $env:PYTHON_PIP_VERSION); \ - Write-Host ('Installing {0} ...' -f $pipInstall); \ + Write-Host ('Installing pip=={0} ...' -f $env:PYTHON_PIP_VERSION); \ # 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 # ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages") # https://github.com/docker-library/python/pull/143#issuecomment-241032683 - pip install --no-cache-dir --upgrade --force-reinstall $pipInstall; \ +# (using "python -m pip" instead of "pip" to avoid pip trying to remove itself while it's running; see also https://pip.readthedocs.io/en/stable/installing/#id6) + python -m pip install --no-cache-dir --upgrade --force-reinstall \ + ('pip=={0}' -f $env:PYTHON_PIP_VERSION) \ + ('setuptools=={0}' -f $env:PYTHON_SETUPTOOLS_VERSION) \ + ('wheel=={0}' -f $env:PYTHON_WHEEL_VERSION) \ + ; \ \ Write-Host 'Verifying pip install ...'; \ pip --version; \