From f011c37131edcd68eba2b7bea5f8d3cbbb834c05 Mon Sep 17 00:00:00 2001 From: Jamie Hewland Date: Thu, 4 Aug 2016 12:36:37 +0200 Subject: [PATCH 01/29] Alpine: install ca-certificates --- 2.7/alpine/Dockerfile | 4 ++++ 3.3/alpine/Dockerfile | 4 ++++ 3.4/alpine/Dockerfile | 4 ++++ 3.5/alpine/Dockerfile | 4 ++++ 3.6/alpine/Dockerfile | 4 ++++ 5 files changed, 20 insertions(+) diff --git a/2.7/alpine/Dockerfile b/2.7/alpine/Dockerfile index 056c49283..e8d14f343 100644 --- a/2.7/alpine/Dockerfile +++ b/2.7/alpine/Dockerfile @@ -4,6 +4,10 @@ FROM alpine:3.4 # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. ENV LANG C.UTF-8 +# install ca-certificates so that HTTPS works consistently +# the other runtime dependencies for Python are installed later +RUN apk add --no-cache ca-certificates + # gpg: key 18ADD4FF: public key "Benjamin Peterson " imported ENV GPG_KEY C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF diff --git a/3.3/alpine/Dockerfile b/3.3/alpine/Dockerfile index e7d5d1fd7..4398c862e 100644 --- a/3.3/alpine/Dockerfile +++ b/3.3/alpine/Dockerfile @@ -4,6 +4,10 @@ FROM alpine:3.4 # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. ENV LANG C.UTF-8 +# install ca-certificates so that HTTPS works consistently +# the other runtime dependencies for Python are installed later +RUN apk add --no-cache ca-certificates + # gpg: key 36580288: public key "Georg Brandl (Python release signing key) " imported ENV GPG_KEY 26DEA9D4613391EF3E25C9FF0A5B101836580288 diff --git a/3.4/alpine/Dockerfile b/3.4/alpine/Dockerfile index 57b9f784a..05df8512e 100644 --- a/3.4/alpine/Dockerfile +++ b/3.4/alpine/Dockerfile @@ -4,6 +4,10 @@ FROM alpine:3.4 # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. ENV LANG C.UTF-8 +# install ca-certificates so that HTTPS works consistently +# the other runtime dependencies for Python are installed later +RUN apk add --no-cache ca-certificates + # gpg: key F73C700D: public key "Larry Hastings " imported ENV GPG_KEY 97FC712E4C024BBEA48A61ED3A5CA953F73C700D diff --git a/3.5/alpine/Dockerfile b/3.5/alpine/Dockerfile index ccae08c80..80691535e 100644 --- a/3.5/alpine/Dockerfile +++ b/3.5/alpine/Dockerfile @@ -4,6 +4,10 @@ FROM alpine:3.4 # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. ENV LANG C.UTF-8 +# install ca-certificates so that HTTPS works consistently +# the other runtime dependencies for Python are installed later +RUN apk add --no-cache ca-certificates + # gpg: key F73C700D: public key "Larry Hastings " imported ENV GPG_KEY 97FC712E4C024BBEA48A61ED3A5CA953F73C700D diff --git a/3.6/alpine/Dockerfile b/3.6/alpine/Dockerfile index 45e1e0d9f..22b2fc6e7 100644 --- a/3.6/alpine/Dockerfile +++ b/3.6/alpine/Dockerfile @@ -4,6 +4,10 @@ FROM alpine:3.4 # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. ENV LANG C.UTF-8 +# install ca-certificates so that HTTPS works consistently +# the other runtime dependencies for Python are installed later +RUN apk add --no-cache ca-certificates + # gpg: key AA65421D: public key "Ned Deily (Python release signing key) " imported ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D From b64778aaf560e088bf604ec5b383b52ee2b28174 Mon Sep 17 00:00:00 2001 From: Boris Feld Date: Thu, 4 Aug 2016 20:14:07 +0200 Subject: [PATCH 02/29] Remove enable_shared in python3.4 Dockerfile In order to compile a static library, we need python to be compiled as static too --- 3.4/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/3.4/Dockerfile b/3.4/Dockerfile index 121e4a518..ccd10861c 100644 --- a/3.4/Dockerfile +++ b/3.4/Dockerfile @@ -50,7 +50,6 @@ RUN set -ex \ && cd /usr/src/python \ && ./configure \ --enable-loadable-sqlite-extensions \ - --enable-shared \ && make -j$(nproc) \ && make install \ && ldconfig \ From 88768137b5d8f713e768850d3ed9ad7b17a15045 Mon Sep 17 00:00:00 2001 From: Boris Feld Date: Thu, 4 Aug 2016 20:14:35 +0200 Subject: [PATCH 03/29] Remove enable_shared in python3.5 Dockerfile In order to compile a static library, we need python to be compiled as static too --- 3.5/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/3.5/Dockerfile b/3.5/Dockerfile index f3971ecf9..20a66d3e7 100644 --- a/3.5/Dockerfile +++ b/3.5/Dockerfile @@ -50,7 +50,6 @@ RUN set -ex \ && cd /usr/src/python \ && ./configure \ --enable-loadable-sqlite-extensions \ - --enable-shared \ && make -j$(nproc) \ && make install \ && ldconfig \ From 3fb83e942ed5c7e910152aabcf27d67f81e5acfd Mon Sep 17 00:00:00 2001 From: Boris Feld Date: Thu, 4 Aug 2016 20:38:55 +0200 Subject: [PATCH 04/29] Remove enable_shared in python3.6 Dockerfile In order to compile a static library, we need python to be compiled as static too --- 3.6/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/3.6/Dockerfile b/3.6/Dockerfile index 348907912..3e07fc1c7 100644 --- a/3.6/Dockerfile +++ b/3.6/Dockerfile @@ -50,7 +50,6 @@ RUN set -ex \ && cd /usr/src/python \ && ./configure \ --enable-loadable-sqlite-extensions \ - --enable-shared \ && make -j$(nproc) \ && make install \ && ldconfig \ From 50fc273793dbbbc371c09b149a79af5ae4e279dd Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Fri, 5 Aug 2016 15:11:16 -0700 Subject: [PATCH 05/29] Revert "Use "dpkg-divert" instead of "purge" to avoid Debian's Python" - this reverts commit a819c92949e182901df10e52d41bc57c6ca73bd5. - since Debian packages use an absolute path, they were broken by the diverts - ensure the local python is first in PATH --- 2.7/Dockerfile | 16 ++-------------- 2.7/slim/Dockerfile | 3 +++ 2.7/wheezy/Dockerfile | 16 ++-------------- 3.3/Dockerfile | 16 ++-------------- 3.3/slim/Dockerfile | 3 +++ 3.3/wheezy/Dockerfile | 16 ++-------------- 3.4/Dockerfile | 16 ++-------------- 3.4/slim/Dockerfile | 3 +++ 3.4/wheezy/Dockerfile | 16 ++-------------- 3.5/Dockerfile | 16 ++-------------- 3.5/slim/Dockerfile | 3 +++ 3.6/Dockerfile | 16 ++-------------- 3.6/slim/Dockerfile | 3 +++ 13 files changed, 31 insertions(+), 112 deletions(-) diff --git a/2.7/Dockerfile b/2.7/Dockerfile index 9b1ffaa96..0a2d28d4d 100644 --- a/2.7/Dockerfile +++ b/2.7/Dockerfile @@ -1,19 +1,7 @@ FROM buildpack-deps:jessie -# divert many traces of Debian Python (so that they are not used by mistake) -# https://bugs.debian.org/33263 :( -RUN set -ex \ - && for bits in \ -# /etc/python* \ - /usr/bin/*2to3* \ - /usr/bin/*python* \ - /usr/bin/pdb* \ - /usr/bin/py* \ -# /usr/lib/python* \ -# /usr/share/python \ - ; do \ - dpkg-divert --rename "$bits"; \ - done +# ensure local python is used over debian python +ENV PATH /usr/local/bin:$PATH # http://bugs.python.org/issue19846 # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. diff --git a/2.7/slim/Dockerfile b/2.7/slim/Dockerfile index 7a72af34c..b7fad4197 100644 --- a/2.7/slim/Dockerfile +++ b/2.7/slim/Dockerfile @@ -1,5 +1,8 @@ FROM debian:jessie +# ensure local python is used over debian python +ENV PATH /usr/local/bin:$PATH + # http://bugs.python.org/issue19846 # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. ENV LANG C.UTF-8 diff --git a/2.7/wheezy/Dockerfile b/2.7/wheezy/Dockerfile index 9731b10b1..5ae74f5e2 100644 --- a/2.7/wheezy/Dockerfile +++ b/2.7/wheezy/Dockerfile @@ -1,19 +1,7 @@ FROM buildpack-deps:wheezy -# divert many traces of Debian Python (so that they are not used by mistake) -# https://bugs.debian.org/33263 :( -RUN set -ex \ - && for bits in \ -# /etc/python* \ - /usr/bin/*2to3* \ - /usr/bin/*python* \ - /usr/bin/pdb* \ - /usr/bin/py* \ -# /usr/lib/python* \ -# /usr/share/python \ - ; do \ - dpkg-divert --rename "$bits"; \ - done +# ensure local python is used over debian python +ENV PATH /usr/local/bin:$PATH # http://bugs.python.org/issue19846 # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. diff --git a/3.3/Dockerfile b/3.3/Dockerfile index 3ef68f81e..51d158a0d 100644 --- a/3.3/Dockerfile +++ b/3.3/Dockerfile @@ -1,19 +1,7 @@ FROM buildpack-deps:jessie -# divert many traces of Debian Python (so that they are not used by mistake) -# https://bugs.debian.org/33263 :( -RUN set -ex \ - && for bits in \ -# /etc/python* \ - /usr/bin/*2to3* \ - /usr/bin/*python* \ - /usr/bin/pdb* \ - /usr/bin/py* \ -# /usr/lib/python* \ -# /usr/share/python \ - ; do \ - dpkg-divert --rename "$bits"; \ - done +# ensure local python is used over debian python +ENV PATH /usr/local/bin:$PATH # http://bugs.python.org/issue19846 # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. diff --git a/3.3/slim/Dockerfile b/3.3/slim/Dockerfile index f54ea740b..5973a0af2 100644 --- a/3.3/slim/Dockerfile +++ b/3.3/slim/Dockerfile @@ -1,5 +1,8 @@ FROM debian:jessie +# ensure local python is used over debian python +ENV PATH /usr/local/bin:$PATH + # http://bugs.python.org/issue19846 # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. ENV LANG C.UTF-8 diff --git a/3.3/wheezy/Dockerfile b/3.3/wheezy/Dockerfile index 45e63bc11..e17d02a91 100644 --- a/3.3/wheezy/Dockerfile +++ b/3.3/wheezy/Dockerfile @@ -1,19 +1,7 @@ FROM buildpack-deps:wheezy -# divert many traces of Debian Python (so that they are not used by mistake) -# https://bugs.debian.org/33263 :( -RUN set -ex \ - && for bits in \ -# /etc/python* \ - /usr/bin/*2to3* \ - /usr/bin/*python* \ - /usr/bin/pdb* \ - /usr/bin/py* \ -# /usr/lib/python* \ -# /usr/share/python \ - ; do \ - dpkg-divert --rename "$bits"; \ - done +# ensure local python is used over debian python +ENV PATH /usr/local/bin:$PATH # http://bugs.python.org/issue19846 # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. diff --git a/3.4/Dockerfile b/3.4/Dockerfile index 121e4a518..57839f690 100644 --- a/3.4/Dockerfile +++ b/3.4/Dockerfile @@ -1,19 +1,7 @@ FROM buildpack-deps:jessie -# divert many traces of Debian Python (so that they are not used by mistake) -# https://bugs.debian.org/33263 :( -RUN set -ex \ - && for bits in \ -# /etc/python* \ - /usr/bin/*2to3* \ - /usr/bin/*python* \ - /usr/bin/pdb* \ - /usr/bin/py* \ -# /usr/lib/python* \ -# /usr/share/python \ - ; do \ - dpkg-divert --rename "$bits"; \ - done +# ensure local python is used over debian python +ENV PATH /usr/local/bin:$PATH # http://bugs.python.org/issue19846 # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. diff --git a/3.4/slim/Dockerfile b/3.4/slim/Dockerfile index b25f47d12..97e25cfc5 100644 --- a/3.4/slim/Dockerfile +++ b/3.4/slim/Dockerfile @@ -1,5 +1,8 @@ FROM debian:jessie +# ensure local python is used over debian python +ENV PATH /usr/local/bin:$PATH + # http://bugs.python.org/issue19846 # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. ENV LANG C.UTF-8 diff --git a/3.4/wheezy/Dockerfile b/3.4/wheezy/Dockerfile index 959aaccac..fcc8186df 100644 --- a/3.4/wheezy/Dockerfile +++ b/3.4/wheezy/Dockerfile @@ -1,19 +1,7 @@ FROM buildpack-deps:wheezy -# divert many traces of Debian Python (so that they are not used by mistake) -# https://bugs.debian.org/33263 :( -RUN set -ex \ - && for bits in \ -# /etc/python* \ - /usr/bin/*2to3* \ - /usr/bin/*python* \ - /usr/bin/pdb* \ - /usr/bin/py* \ -# /usr/lib/python* \ -# /usr/share/python \ - ; do \ - dpkg-divert --rename "$bits"; \ - done +# ensure local python is used over debian python +ENV PATH /usr/local/bin:$PATH # http://bugs.python.org/issue19846 # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. diff --git a/3.5/Dockerfile b/3.5/Dockerfile index f3971ecf9..b494dcd08 100644 --- a/3.5/Dockerfile +++ b/3.5/Dockerfile @@ -1,19 +1,7 @@ FROM buildpack-deps:jessie -# divert many traces of Debian Python (so that they are not used by mistake) -# https://bugs.debian.org/33263 :( -RUN set -ex \ - && for bits in \ -# /etc/python* \ - /usr/bin/*2to3* \ - /usr/bin/*python* \ - /usr/bin/pdb* \ - /usr/bin/py* \ -# /usr/lib/python* \ -# /usr/share/python \ - ; do \ - dpkg-divert --rename "$bits"; \ - done +# ensure local python is used over debian python +ENV PATH /usr/local/bin:$PATH # http://bugs.python.org/issue19846 # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. diff --git a/3.5/slim/Dockerfile b/3.5/slim/Dockerfile index 2ff34f07e..0c88f2c82 100644 --- a/3.5/slim/Dockerfile +++ b/3.5/slim/Dockerfile @@ -1,5 +1,8 @@ FROM debian:jessie +# ensure local python is used over debian python +ENV PATH /usr/local/bin:$PATH + # http://bugs.python.org/issue19846 # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. ENV LANG C.UTF-8 diff --git a/3.6/Dockerfile b/3.6/Dockerfile index 348907912..b4b61e601 100644 --- a/3.6/Dockerfile +++ b/3.6/Dockerfile @@ -1,19 +1,7 @@ FROM buildpack-deps:jessie -# divert many traces of Debian Python (so that they are not used by mistake) -# https://bugs.debian.org/33263 :( -RUN set -ex \ - && for bits in \ -# /etc/python* \ - /usr/bin/*2to3* \ - /usr/bin/*python* \ - /usr/bin/pdb* \ - /usr/bin/py* \ -# /usr/lib/python* \ -# /usr/share/python \ - ; do \ - dpkg-divert --rename "$bits"; \ - done +# ensure local python is used over debian python +ENV PATH /usr/local/bin:$PATH # http://bugs.python.org/issue19846 # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. diff --git a/3.6/slim/Dockerfile b/3.6/slim/Dockerfile index 4e0cc1294..7e407dfa6 100644 --- a/3.6/slim/Dockerfile +++ b/3.6/slim/Dockerfile @@ -1,5 +1,8 @@ FROM debian:jessie +# ensure local python is used over debian python +ENV PATH /usr/local/bin:$PATH + # http://bugs.python.org/issue19846 # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. ENV LANG C.UTF-8 From 7ea58b992e65e0c95226e8acb1a4f3b2e2f72554 Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Fri, 5 Aug 2016 15:35:57 -0700 Subject: [PATCH 06/29] Fix whitespace to tabs --- 2.7/Dockerfile | 6 +++--- 2.7/alpine/Dockerfile | 6 +++--- 2.7/slim/Dockerfile | 6 +++--- 2.7/wheezy/Dockerfile | 6 +++--- 3.3/Dockerfile | 6 +++--- 3.3/alpine/Dockerfile | 6 +++--- 3.3/slim/Dockerfile | 6 +++--- 3.3/wheezy/Dockerfile | 6 +++--- 3.4/Dockerfile | 6 +++--- 3.4/alpine/Dockerfile | 6 +++--- 3.4/slim/Dockerfile | 6 +++--- 3.4/wheezy/Dockerfile | 6 +++--- 3.5/Dockerfile | 6 +++--- 3.5/alpine/Dockerfile | 6 +++--- 3.5/slim/Dockerfile | 6 +++--- 3.6/Dockerfile | 6 +++--- 3.6/alpine/Dockerfile | 6 +++--- 3.6/slim/Dockerfile | 6 +++--- 18 files changed, 54 insertions(+), 54 deletions(-) diff --git a/2.7/Dockerfile b/2.7/Dockerfile index 0a2d28d4d..ea1dc0837 100644 --- a/2.7/Dockerfile +++ b/2.7/Dockerfile @@ -47,9 +47,9 @@ RUN set -ex \ && [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ && find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ - -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type d -a -name test -o -name tests \) \ + -o \ + \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ \) -exec rm -rf '{}' + \ && apt-get purge -y --auto-remove $buildDeps \ && rm -rf /usr/src/python ~/.cache diff --git a/2.7/alpine/Dockerfile b/2.7/alpine/Dockerfile index 056c49283..d540e39fd 100644 --- a/2.7/alpine/Dockerfile +++ b/2.7/alpine/Dockerfile @@ -50,9 +50,9 @@ RUN set -ex \ && [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ && find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ - -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type d -a -name test -o -name tests \) \ + -o \ + \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ \) -exec rm -rf '{}' + \ && runDeps="$( \ scanelf --needed --nobanner --recursive /usr/local \ diff --git a/2.7/slim/Dockerfile b/2.7/slim/Dockerfile index b7fad4197..ee7b1cd09 100644 --- a/2.7/slim/Dockerfile +++ b/2.7/slim/Dockerfile @@ -60,9 +60,9 @@ RUN set -ex \ && [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ && find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ - -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type d -a -name test -o -name tests \) \ + -o \ + \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ \) -exec rm -rf '{}' + \ && apt-get purge -y --auto-remove $buildDeps \ && rm -rf /usr/src/python ~/.cache diff --git a/2.7/wheezy/Dockerfile b/2.7/wheezy/Dockerfile index 5ae74f5e2..e68c736af 100644 --- a/2.7/wheezy/Dockerfile +++ b/2.7/wheezy/Dockerfile @@ -47,9 +47,9 @@ RUN set -ex \ && [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ && find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ - -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type d -a -name test -o -name tests \) \ + -o \ + \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ \) -exec rm -rf '{}' + \ && apt-get purge -y --auto-remove $buildDeps \ && rm -rf /usr/src/python ~/.cache diff --git a/3.3/Dockerfile b/3.3/Dockerfile index 51d158a0d..0ca77a653 100644 --- a/3.3/Dockerfile +++ b/3.3/Dockerfile @@ -47,9 +47,9 @@ RUN set -ex \ && [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ && find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ - -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type d -a -name test -o -name tests \) \ + -o \ + \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ \) -exec rm -rf '{}' + \ && apt-get purge -y --auto-remove $buildDeps \ && rm -rf /usr/src/python ~/.cache diff --git a/3.3/alpine/Dockerfile b/3.3/alpine/Dockerfile index e7d5d1fd7..bb1f6011a 100644 --- a/3.3/alpine/Dockerfile +++ b/3.3/alpine/Dockerfile @@ -51,9 +51,9 @@ RUN set -ex \ && [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ && find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ - -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type d -a -name test -o -name tests \) \ + -o \ + \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ \) -exec rm -rf '{}' + \ && runDeps="$( \ scanelf --needed --nobanner --recursive /usr/local \ diff --git a/3.3/slim/Dockerfile b/3.3/slim/Dockerfile index 5973a0af2..030cff5b3 100644 --- a/3.3/slim/Dockerfile +++ b/3.3/slim/Dockerfile @@ -61,9 +61,9 @@ RUN set -ex \ && [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ && find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ - -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type d -a -name test -o -name tests \) \ + -o \ + \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ \) -exec rm -rf '{}' + \ && apt-get purge -y --auto-remove $buildDeps \ && rm -rf /usr/src/python ~/.cache diff --git a/3.3/wheezy/Dockerfile b/3.3/wheezy/Dockerfile index e17d02a91..0f1787ebb 100644 --- a/3.3/wheezy/Dockerfile +++ b/3.3/wheezy/Dockerfile @@ -47,9 +47,9 @@ RUN set -ex \ && [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ && find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ - -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type d -a -name test -o -name tests \) \ + -o \ + \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ \) -exec rm -rf '{}' + \ && apt-get purge -y --auto-remove $buildDeps \ && rm -rf /usr/src/python ~/.cache diff --git a/3.4/Dockerfile b/3.4/Dockerfile index 57839f690..e66500d5f 100644 --- a/3.4/Dockerfile +++ b/3.4/Dockerfile @@ -46,9 +46,9 @@ RUN set -ex \ && [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ && find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ - -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type d -a -name test -o -name tests \) \ + -o \ + \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ \) -exec rm -rf '{}' + \ && apt-get purge -y --auto-remove $buildDeps \ && rm -rf /usr/src/python ~/.cache diff --git a/3.4/alpine/Dockerfile b/3.4/alpine/Dockerfile index 57b9f784a..6ca15c6cf 100644 --- a/3.4/alpine/Dockerfile +++ b/3.4/alpine/Dockerfile @@ -51,9 +51,9 @@ RUN set -ex \ && [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ && find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ - -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type d -a -name test -o -name tests \) \ + -o \ + \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ \) -exec rm -rf '{}' + \ && runDeps="$( \ scanelf --needed --nobanner --recursive /usr/local \ diff --git a/3.4/slim/Dockerfile b/3.4/slim/Dockerfile index 97e25cfc5..17adf6129 100644 --- a/3.4/slim/Dockerfile +++ b/3.4/slim/Dockerfile @@ -60,9 +60,9 @@ RUN set -ex \ && [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ && find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ - -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type d -a -name test -o -name tests \) \ + -o \ + \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ \) -exec rm -rf '{}' + \ && apt-get purge -y --auto-remove $buildDeps \ && rm -rf /usr/src/python ~/.cache diff --git a/3.4/wheezy/Dockerfile b/3.4/wheezy/Dockerfile index fcc8186df..9d52bc896 100644 --- a/3.4/wheezy/Dockerfile +++ b/3.4/wheezy/Dockerfile @@ -46,9 +46,9 @@ RUN set -ex \ && [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ && find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ - -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type d -a -name test -o -name tests \) \ + -o \ + \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ \) -exec rm -rf '{}' + \ && apt-get purge -y --auto-remove $buildDeps \ && rm -rf /usr/src/python ~/.cache diff --git a/3.5/Dockerfile b/3.5/Dockerfile index b494dcd08..a52b1588e 100644 --- a/3.5/Dockerfile +++ b/3.5/Dockerfile @@ -46,9 +46,9 @@ RUN set -ex \ && [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ && find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ - -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type d -a -name test -o -name tests \) \ + -o \ + \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ \) -exec rm -rf '{}' + \ && apt-get purge -y --auto-remove $buildDeps \ && rm -rf /usr/src/python ~/.cache diff --git a/3.5/alpine/Dockerfile b/3.5/alpine/Dockerfile index ccae08c80..355ee1d14 100644 --- a/3.5/alpine/Dockerfile +++ b/3.5/alpine/Dockerfile @@ -51,9 +51,9 @@ RUN set -ex \ && [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ && find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ - -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type d -a -name test -o -name tests \) \ + -o \ + \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ \) -exec rm -rf '{}' + \ && runDeps="$( \ scanelf --needed --nobanner --recursive /usr/local \ diff --git a/3.5/slim/Dockerfile b/3.5/slim/Dockerfile index 0c88f2c82..4a5ed5644 100644 --- a/3.5/slim/Dockerfile +++ b/3.5/slim/Dockerfile @@ -60,9 +60,9 @@ RUN set -ex \ && [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ && find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ - -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type d -a -name test -o -name tests \) \ + -o \ + \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ \) -exec rm -rf '{}' + \ && apt-get purge -y --auto-remove $buildDeps \ && rm -rf /usr/src/python ~/.cache diff --git a/3.6/Dockerfile b/3.6/Dockerfile index b4b61e601..7652dc62e 100644 --- a/3.6/Dockerfile +++ b/3.6/Dockerfile @@ -46,9 +46,9 @@ RUN set -ex \ && [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ && find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ - -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type d -a -name test -o -name tests \) \ + -o \ + \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ \) -exec rm -rf '{}' + \ && apt-get purge -y --auto-remove $buildDeps \ && rm -rf /usr/src/python ~/.cache diff --git a/3.6/alpine/Dockerfile b/3.6/alpine/Dockerfile index 45e1e0d9f..f61c26caf 100644 --- a/3.6/alpine/Dockerfile +++ b/3.6/alpine/Dockerfile @@ -51,9 +51,9 @@ RUN set -ex \ && [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ && find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ - -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type d -a -name test -o -name tests \) \ + -o \ + \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ \) -exec rm -rf '{}' + \ && runDeps="$( \ scanelf --needed --nobanner --recursive /usr/local \ diff --git a/3.6/slim/Dockerfile b/3.6/slim/Dockerfile index 7e407dfa6..5ceb89df0 100644 --- a/3.6/slim/Dockerfile +++ b/3.6/slim/Dockerfile @@ -60,9 +60,9 @@ RUN set -ex \ && [ "$(pip list | awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ && find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ - -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type d -a -name test -o -name tests \) \ + -o \ + \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ \) -exec rm -rf '{}' + \ && apt-get purge -y --auto-remove $buildDeps \ && rm -rf /usr/src/python ~/.cache From b3269e5237f8005944f7199f7247fb97e5e5ce9b Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 8 Aug 2016 13:50:03 -0700 Subject: [PATCH 07/29] Add a few simple Python 3 templates based on existing Dockerfiles --- Dockerfile-alpine.template | 98 +++++++++++++++++++++++++++++++++++++ Dockerfile-debian.template | 73 +++++++++++++++++++++++++++ Dockerfile-onbuild.template | 9 ++++ Dockerfile-slim.template | 86 ++++++++++++++++++++++++++++++++ update.sh | 64 ++++++++++++++++++++++-- 5 files changed, 325 insertions(+), 5 deletions(-) create mode 100644 Dockerfile-alpine.template create mode 100644 Dockerfile-debian.template create mode 100644 Dockerfile-onbuild.template create mode 100644 Dockerfile-slim.template diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template new file mode 100644 index 000000000..22a7bae0e --- /dev/null +++ b/Dockerfile-alpine.template @@ -0,0 +1,98 @@ +FROM alpine:3.4 + +# ensure local python is preferred over distribution python +ENV PATH /usr/local/bin:$PATH + +# http://bugs.python.org/issue19846 +# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. +ENV LANG C.UTF-8 + +# install ca-certificates so that HTTPS works consistently +# the other runtime dependencies for Python are installed later +RUN apk add --no-cache ca-certificates + +ENV GPG_KEY %%PLACEHOLDER%% +ENV PYTHON_VERSION %%PLACEHOLDER%% + +# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" +ENV PYTHON_PIP_VERSION %%PLACEHOLDER%% + +RUN set -ex \ + && apk add --no-cache --virtual .fetch-deps \ + gnupg \ + openssl \ + tar \ + xz \ + \ + && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ + && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ + && export GNUPGHOME="$(mktemp -d)" \ + && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && gpg --batch --verify python.tar.xz.asc python.tar.xz \ + && rm -r "$GNUPGHOME" python.tar.xz.asc \ + && mkdir -p /usr/src/python \ + && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \ + && rm python.tar.xz \ + \ + && apk add --no-cache --virtual .build-deps \ + bzip2-dev \ + gcc \ + libc-dev \ + linux-headers \ + make \ + ncurses-dev \ + openssl \ + openssl-dev \ + pax-utils \ + readline-dev \ + sqlite-dev \ + tcl-dev \ + tk \ + tk-dev \ + xz-dev \ + zlib-dev \ +# add build deps before removing fetch deps in case there's overlap + && apk del .fetch-deps \ + \ + && cd /usr/src/python \ + && ./configure \ + --enable-loadable-sqlite-extensions \ + --enable-shared \ + && make -j$(getconf _NPROCESSORS_ONLN) \ + && make install \ + \ +# explicit path to "pip3" to ensure distribution-provided "pip3" cannot interfere + && if [ ! -e /usr/local/bin/pip3 ]; then : \ + && wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \ + && python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \ + && rm /tmp/get-pip.py \ + ; fi \ + && pip3 install --no-cache-dir --upgrade "pip==$PYTHON_PIP_VERSION" \ + && [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ + \ + && find /usr/local -depth \ + \( \ + \( -type d -a -name test -o -name tests \) \ + -o \ + \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \) -exec rm -rf '{}' + \ + && runDeps="$( \ + scanelf --needed --nobanner --recursive /usr/local \ + | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \ + | sort -u \ + | xargs -r apk info --installed \ + | sort -u \ + )" \ + && apk add --virtual .python-rundeps $runDeps \ + && apk del .build-deps \ + && rm -rf /usr/src/python ~/.cache + +# make some useful symlinks that are expected to exist +RUN cd /usr/local/bin \ + && { [ -e easy_install ] || ln -s easy_install-* easy_install; } \ + && ln -s idle3 idle \ + && ln -s pydoc3 pydoc \ + && ln -s python3 python \ + && ln -s python3-config python-config + +CMD ["python3"] diff --git a/Dockerfile-debian.template b/Dockerfile-debian.template new file mode 100644 index 000000000..f9df74b38 --- /dev/null +++ b/Dockerfile-debian.template @@ -0,0 +1,73 @@ +FROM buildpack-deps:jessie + +# ensure local python is preferred over distribution python +ENV PATH /usr/local/bin:$PATH + +# http://bugs.python.org/issue19846 +# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. +ENV LANG C.UTF-8 + +# runtime dependencies +RUN apt-get update && apt-get install -y --no-install-recommends \ + tcl \ + tk \ + && rm -rf /var/lib/apt/lists/* + +ENV GPG_KEY %%PLACEHOLDER%% +ENV PYTHON_VERSION %%PLACEHOLDER%% + +# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" +ENV PYTHON_PIP_VERSION %%PLACEHOLDER%% + +RUN set -ex \ + && buildDeps=' \ + tcl-dev \ + tk-dev \ + ' \ + && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ + \ + && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ + && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ + && export GNUPGHOME="$(mktemp -d)" \ + && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && gpg --batch --verify python.tar.xz.asc python.tar.xz \ + && rm -r "$GNUPGHOME" python.tar.xz.asc \ + && mkdir -p /usr/src/python \ + && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \ + && rm python.tar.xz \ + \ + && cd /usr/src/python \ + && ./configure \ + --enable-loadable-sqlite-extensions \ + --enable-shared \ + && make -j$(nproc) \ + && make install \ + && ldconfig \ + \ +# explicit path to "pip3" to ensure distribution-provided "pip3" cannot interfere + && if [ ! -e /usr/local/bin/pip3 ]; then : \ + && wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \ + && python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \ + && rm /tmp/get-pip.py \ + ; fi \ + && pip3 install --no-cache-dir --upgrade "pip==$PYTHON_PIP_VERSION" \ + && [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ + \ + && find /usr/local -depth \ + \( \ + \( -type d -a -name test -o -name tests \) \ + -o \ + \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \) -exec rm -rf '{}' + \ + && apt-get purge -y --auto-remove $buildDeps \ + && rm -rf /usr/src/python ~/.cache + +# make some useful symlinks that are expected to exist +RUN cd /usr/local/bin \ + && { [ -e easy_install ] || ln -s easy_install-* easy_install; } \ + && ln -s idle3 idle \ + && ln -s pydoc3 pydoc \ + && ln -s python3 python \ + && ln -s python3-config python-config + +CMD ["python3"] diff --git a/Dockerfile-onbuild.template b/Dockerfile-onbuild.template new file mode 100644 index 000000000..2950ec194 --- /dev/null +++ b/Dockerfile-onbuild.template @@ -0,0 +1,9 @@ +FROM python:%%PLACEHOLDER%% + +RUN mkdir -p /usr/src/app +WORKDIR /usr/src/app + +ONBUILD COPY requirements.txt /usr/src/app/ +ONBUILD RUN pip install --no-cache-dir -r requirements.txt + +ONBUILD COPY . /usr/src/app diff --git a/Dockerfile-slim.template b/Dockerfile-slim.template new file mode 100644 index 000000000..c0ac7258c --- /dev/null +++ b/Dockerfile-slim.template @@ -0,0 +1,86 @@ +FROM debian:jessie + +# ensure local python is preferred over distribution python +ENV PATH /usr/local/bin:$PATH + +# http://bugs.python.org/issue19846 +# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. +ENV LANG C.UTF-8 + +# runtime dependencies +RUN apt-get update && apt-get install -y --no-install-recommends \ + ca-certificates \ + libsqlite3-0 \ + libssl1.0.0 \ + && rm -rf /var/lib/apt/lists/* + +ENV GPG_KEY %%PLACEHOLDER%% +ENV PYTHON_VERSION %%PLACEHOLDER%% + +# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" +ENV PYTHON_PIP_VERSION %%PLACEHOLDER%% + +RUN set -ex \ + && buildDeps=' \ + gcc \ + libbz2-dev \ + libc6-dev \ + liblzma-dev \ + libncurses-dev \ + libreadline-dev \ + libsqlite3-dev \ + libssl-dev \ + make \ + tcl-dev \ + tk-dev \ + wget \ + xz-utils \ + zlib1g-dev \ + ' \ + && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ + \ + && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ + && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ + && export GNUPGHOME="$(mktemp -d)" \ + && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && gpg --batch --verify python.tar.xz.asc python.tar.xz \ + && rm -r "$GNUPGHOME" python.tar.xz.asc \ + && mkdir -p /usr/src/python \ + && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \ + && rm python.tar.xz \ + \ + && cd /usr/src/python \ + && ./configure \ + --enable-loadable-sqlite-extensions \ + --enable-shared \ + && make -j$(nproc) \ + && make install \ + && ldconfig \ + \ +# explicit path to "pip3" to ensure distribution-provided "pip3" cannot interfere + && if [ ! -e /usr/local/bin/pip3 ]; then : \ + && wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \ + && python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \ + && rm /tmp/get-pip.py \ + ; fi \ + && pip3 install --no-cache-dir --upgrade "pip==$PYTHON_PIP_VERSION" \ + && [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ + \ + && find /usr/local -depth \ + \( \ + \( -type d -a -name test -o -name tests \) \ + -o \ + \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \) -exec rm -rf '{}' + \ + && apt-get purge -y --auto-remove $buildDeps \ + && rm -rf /usr/src/python ~/.cache + +# make some useful symlinks that are expected to exist +RUN cd /usr/local/bin \ + && { [ -e easy_install ] || ln -s easy_install-* easy_install; } \ + && ln -s idle3 idle \ + && ln -s pydoc3 pydoc \ + && ln -s python3 python \ + && ln -s python3-config python-config + +CMD ["python3"] diff --git a/update.sh b/update.sh index 937bf378e..3a363a614 100755 --- a/update.sh +++ b/update.sh @@ -1,6 +1,28 @@ #!/bin/bash set -e +declare -A gpgKeys=( + # gpg: key 18ADD4FF: public key "Benjamin Peterson " imported + [2.7]='C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF' + # https://www.python.org/dev/peps/pep-0373/#release-manager-and-crew + + # gpg: key 36580288: public key "Georg Brandl (Python release signing key) " imported + [3.3]='26DEA9D4613391EF3E25C9FF0A5B101836580288' + # https://www.python.org/dev/peps/pep-0398/#release-manager-and-crew + + # gpg: key F73C700D: public key "Larry Hastings " imported + [3.4]='97FC712E4C024BBEA48A61ED3A5CA953F73C700D' + # https://www.python.org/dev/peps/pep-0429/#release-manager-and-crew + + # gpg: key F73C700D: public key "Larry Hastings " imported + [3.5]='97FC712E4C024BBEA48A61ED3A5CA953F73C700D' + # https://www.python.org/dev/peps/pep-0478/#release-manager-and-crew + + # gpg: key AA65421D: public key "Ned Deily (Python release signing key) " imported + [3.6]='0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D' + # https://www.python.org/dev/peps/pep-0494/#release-manager-and-crew +) + cd "$(dirname "$(readlink -f "$BASH_SOURCE")")" versions=( "$@" ) @@ -11,6 +33,17 @@ versions=( "${versions[@]%/}" ) pipVersion="$(curl -fsSL 'https://pypi.python.org/pypi/pip/json' | awk -F '"' '$2 == "version" { print $4 }')" +generated_warning() { + cat <<-EOH + # + # NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" + # + # PLEASE DO NOT EDIT IT DIRECTLY. + # + + EOH +} + travisEnv= for version in "${versions[@]}"; do # Python 2.7.8 @@ -26,13 +59,34 @@ for version in "${versions[@]}"; do echo } >&2 else + if [[ "$version" != 2.* ]]; then + for variant in \ + debian \ + alpine \ + slim \ + onbuild \ + ; do + if [ "$variant" = 'debian' ]; then + dir="$version" + else + dir="$version/$variant" + fi + template="Dockerfile-$variant.template" + { generated_warning; cat "$template"; } > "$dir/Dockerfile" + done + if [ -d "$version/wheezy" ]; then + cp "$version/Dockerfile" "$version/wheezy/Dockerfile" + sed -ri 's/:jessie/:wheezy/g' "$version/wheezy/Dockerfile" + fi + fi ( set -x - sed -ri ' - s/^(ENV PYTHON_VERSION) .*/\1 '"$fullVersion"'/; - s/^(ENV PYTHON_PIP_VERSION) .*/\1 '"$pipVersion"'/; - ' "$version"/{,*/}Dockerfile - sed -ri 's/^(FROM python):.*/\1:'"$version"'/' "$version/onbuild/Dockerfile" + sed -ri \ + -e 's/^(ENV GPG_KEY) .*/\1 '"${gpgKeys[$version]}"'/' \ + -e 's/^(ENV PYTHON_VERSION) .*/\1 '"$fullVersion"'/' \ + -e 's/^(ENV PYTHON_PIP_VERSION) .*/\1 '"$pipVersion"'/' \ + -e 's/^(FROM python):.*/\1:'"$version"'/' \ + "$version"/{,*/}Dockerfile ) fi for variant in wheezy alpine slim; do From 9a9021f2134d953165b31d98cacb95aa34076f90 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 8 Aug 2016 13:54:15 -0700 Subject: [PATCH 08/29] Apply update.sh (templates) --- 3.3/Dockerfile | 41 ++++++++++++++++++++++++++++------------- 3.3/alpine/Dockerfile | 42 +++++++++++++++++++++++++++++++++--------- 3.3/onbuild/Dockerfile | 6 ++++++ 3.3/slim/Dockerfile | 32 +++++++++++++++++++++++--------- 3.3/wheezy/Dockerfile | 41 ++++++++++++++++++++++++++++------------- 3.4/Dockerfile | 41 ++++++++++++++++++++++++++++------------- 3.4/alpine/Dockerfile | 41 ++++++++++++++++++++++++++++++++--------- 3.4/onbuild/Dockerfile | 6 ++++++ 3.4/slim/Dockerfile | 32 +++++++++++++++++++++++--------- 3.4/wheezy/Dockerfile | 41 ++++++++++++++++++++++++++++------------- 3.5/Dockerfile | 41 ++++++++++++++++++++++++++++------------- 3.5/alpine/Dockerfile | 41 ++++++++++++++++++++++++++++++++--------- 3.5/onbuild/Dockerfile | 6 ++++++ 3.5/slim/Dockerfile | 32 +++++++++++++++++++++++--------- 14 files changed, 324 insertions(+), 119 deletions(-) diff --git a/3.3/Dockerfile b/3.3/Dockerfile index 0ca77a653..c9784367b 100644 --- a/3.3/Dockerfile +++ b/3.3/Dockerfile @@ -1,15 +1,25 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + FROM buildpack-deps:jessie -# ensure local python is used over debian python +# ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH # http://bugs.python.org/issue19846 # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. ENV LANG C.UTF-8 -# gpg: key 36580288: public key "Georg Brandl (Python release signing key) " imported -ENV GPG_KEY 26DEA9D4613391EF3E25C9FF0A5B101836580288 +# runtime dependencies +RUN apt-get update && apt-get install -y --no-install-recommends \ + tcl \ + tk \ + && rm -rf /var/lib/apt/lists/* +ENV GPG_KEY 26DEA9D4613391EF3E25C9FF0A5B101836580288 ENV PYTHON_VERSION 3.3.6 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" @@ -20,13 +30,10 @@ RUN set -ex \ tcl-dev \ tk-dev \ ' \ - && runDeps=' \ - tcl \ - tk \ - ' \ - && apt-get update && apt-get install -y $runDeps $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ - && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \ - && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \ + && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ + \ + && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ + && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ @@ -42,9 +49,16 @@ RUN set -ex \ && make -j$(nproc) \ && make install \ && 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" ] \ + \ +# explicit path to "pip3" to ensure distribution-provided "pip3" cannot interfere + && if [ ! -e /usr/local/bin/pip3 ]; then : \ + && wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \ + && python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \ + && rm /tmp/get-pip.py \ + ; fi \ + && pip3 install --no-cache-dir --upgrade "pip==$PYTHON_PIP_VERSION" \ + && [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ + \ && find /usr/local -depth \ \( \ \( -type d -a -name test -o -name tests \) \ @@ -56,6 +70,7 @@ RUN set -ex \ # make some useful symlinks that are expected to exist RUN cd /usr/local/bin \ + && { [ -e easy_install ] || ln -s easy_install-* easy_install; } \ && ln -s idle3 idle \ && ln -s pydoc3 pydoc \ && ln -s python3 python \ diff --git a/3.3/alpine/Dockerfile b/3.3/alpine/Dockerfile index 08c419eec..b04660e17 100644 --- a/3.3/alpine/Dockerfile +++ b/3.3/alpine/Dockerfile @@ -1,5 +1,14 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + FROM alpine:3.4 +# ensure local python is preferred over distribution python +ENV PATH /usr/local/bin:$PATH + # http://bugs.python.org/issue19846 # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. ENV LANG C.UTF-8 @@ -8,18 +17,21 @@ ENV LANG C.UTF-8 # the other runtime dependencies for Python are installed later RUN apk add --no-cache ca-certificates -# gpg: key 36580288: public key "Georg Brandl (Python release signing key) " imported ENV GPG_KEY 26DEA9D4613391EF3E25C9FF0A5B101836580288 - ENV PYTHON_VERSION 3.3.6 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 8.1.2 RUN set -ex \ - && apk add --no-cache --virtual .fetch-deps curl gnupg tar xz \ - && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \ - && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \ + && apk add --no-cache --virtual .fetch-deps \ + gnupg \ + openssl \ + tar \ + xz \ + \ + && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ + && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ @@ -35,6 +47,7 @@ RUN set -ex \ linux-headers \ make \ ncurses-dev \ + openssl \ openssl-dev \ pax-utils \ readline-dev \ @@ -44,15 +57,25 @@ RUN set -ex \ tk-dev \ xz-dev \ zlib-dev \ +# add build deps before removing fetch deps in case there's overlap + && apk del .fetch-deps \ + \ && cd /usr/src/python \ && ./configure \ --enable-loadable-sqlite-extensions \ --enable-shared \ && make -j$(getconf _NPROCESSORS_ONLN) \ && 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" ] \ + \ +# explicit path to "pip3" to ensure distribution-provided "pip3" cannot interfere + && if [ ! -e /usr/local/bin/pip3 ]; then : \ + && wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \ + && python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \ + && rm /tmp/get-pip.py \ + ; fi \ + && pip3 install --no-cache-dir --upgrade "pip==$PYTHON_PIP_VERSION" \ + && [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ + \ && find /usr/local -depth \ \( \ \( -type d -a -name test -o -name tests \) \ @@ -67,11 +90,12 @@ RUN set -ex \ | sort -u \ )" \ && apk add --virtual .python-rundeps $runDeps \ - && apk del .build-deps .fetch-deps \ + && apk del .build-deps \ && rm -rf /usr/src/python ~/.cache # make some useful symlinks that are expected to exist RUN cd /usr/local/bin \ + && { [ -e easy_install ] || ln -s easy_install-* easy_install; } \ && ln -s idle3 idle \ && ln -s pydoc3 pydoc \ && ln -s python3 python \ diff --git a/3.3/onbuild/Dockerfile b/3.3/onbuild/Dockerfile index b200ef8e3..bc96d2fc7 100644 --- a/3.3/onbuild/Dockerfile +++ b/3.3/onbuild/Dockerfile @@ -1,3 +1,9 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + FROM python:3.3 RUN mkdir -p /usr/src/app diff --git a/3.3/slim/Dockerfile b/3.3/slim/Dockerfile index 030cff5b3..a12e09c9e 100644 --- a/3.3/slim/Dockerfile +++ b/3.3/slim/Dockerfile @@ -1,21 +1,26 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + FROM debian:jessie -# ensure local python is used over debian python +# ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH # http://bugs.python.org/issue19846 # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. ENV LANG C.UTF-8 +# runtime dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates \ libsqlite3-0 \ libssl1.0.0 \ && rm -rf /var/lib/apt/lists/* -# gpg: key 36580288: public key "Georg Brandl (Python release signing key) " imported ENV GPG_KEY 26DEA9D4613391EF3E25C9FF0A5B101836580288 - ENV PYTHON_VERSION 3.3.6 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" @@ -23,7 +28,6 @@ ENV PYTHON_PIP_VERSION 8.1.2 RUN set -ex \ && buildDeps=' \ - curl \ gcc \ libbz2-dev \ libc6-dev \ @@ -35,12 +39,14 @@ RUN set -ex \ make \ tcl-dev \ tk-dev \ + wget \ xz-utils \ zlib1g-dev \ ' \ && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ - && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \ - && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \ + \ + && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ + && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ @@ -56,9 +62,16 @@ RUN set -ex \ && make -j$(nproc) \ && make install \ && 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" ] \ + \ +# explicit path to "pip3" to ensure distribution-provided "pip3" cannot interfere + && if [ ! -e /usr/local/bin/pip3 ]; then : \ + && wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \ + && python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \ + && rm /tmp/get-pip.py \ + ; fi \ + && pip3 install --no-cache-dir --upgrade "pip==$PYTHON_PIP_VERSION" \ + && [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ + \ && find /usr/local -depth \ \( \ \( -type d -a -name test -o -name tests \) \ @@ -70,6 +83,7 @@ RUN set -ex \ # make some useful symlinks that are expected to exist RUN cd /usr/local/bin \ + && { [ -e easy_install ] || ln -s easy_install-* easy_install; } \ && ln -s idle3 idle \ && ln -s pydoc3 pydoc \ && ln -s python3 python \ diff --git a/3.3/wheezy/Dockerfile b/3.3/wheezy/Dockerfile index 0f1787ebb..ef0c41598 100644 --- a/3.3/wheezy/Dockerfile +++ b/3.3/wheezy/Dockerfile @@ -1,15 +1,25 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + FROM buildpack-deps:wheezy -# ensure local python is used over debian python +# ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH # http://bugs.python.org/issue19846 # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. ENV LANG C.UTF-8 -# gpg: key 36580288: public key "Georg Brandl (Python release signing key) " imported -ENV GPG_KEY 26DEA9D4613391EF3E25C9FF0A5B101836580288 +# runtime dependencies +RUN apt-get update && apt-get install -y --no-install-recommends \ + tcl \ + tk \ + && rm -rf /var/lib/apt/lists/* +ENV GPG_KEY 26DEA9D4613391EF3E25C9FF0A5B101836580288 ENV PYTHON_VERSION 3.3.6 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" @@ -20,13 +30,10 @@ RUN set -ex \ tcl-dev \ tk-dev \ ' \ - && runDeps=' \ - tcl \ - tk \ - ' \ - && apt-get update && apt-get install -y $runDeps $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ - && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \ - && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \ + && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ + \ + && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ + && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ @@ -42,9 +49,16 @@ RUN set -ex \ && make -j$(nproc) \ && make install \ && 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" ] \ + \ +# explicit path to "pip3" to ensure distribution-provided "pip3" cannot interfere + && if [ ! -e /usr/local/bin/pip3 ]; then : \ + && wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \ + && python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \ + && rm /tmp/get-pip.py \ + ; fi \ + && pip3 install --no-cache-dir --upgrade "pip==$PYTHON_PIP_VERSION" \ + && [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ + \ && find /usr/local -depth \ \( \ \( -type d -a -name test -o -name tests \) \ @@ -56,6 +70,7 @@ RUN set -ex \ # make some useful symlinks that are expected to exist RUN cd /usr/local/bin \ + && { [ -e easy_install ] || ln -s easy_install-* easy_install; } \ && ln -s idle3 idle \ && ln -s pydoc3 pydoc \ && ln -s python3 python \ diff --git a/3.4/Dockerfile b/3.4/Dockerfile index e66500d5f..c42717bf3 100644 --- a/3.4/Dockerfile +++ b/3.4/Dockerfile @@ -1,15 +1,25 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + FROM buildpack-deps:jessie -# ensure local python is used over debian python +# ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH # http://bugs.python.org/issue19846 # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. ENV LANG C.UTF-8 -# gpg: key F73C700D: public key "Larry Hastings " imported -ENV GPG_KEY 97FC712E4C024BBEA48A61ED3A5CA953F73C700D +# runtime dependencies +RUN apt-get update && apt-get install -y --no-install-recommends \ + tcl \ + tk \ + && rm -rf /var/lib/apt/lists/* +ENV GPG_KEY 97FC712E4C024BBEA48A61ED3A5CA953F73C700D ENV PYTHON_VERSION 3.4.5 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" @@ -20,13 +30,10 @@ RUN set -ex \ tcl-dev \ tk-dev \ ' \ - && runDeps=' \ - tcl \ - tk \ - ' \ - && apt-get update && apt-get install -y $runDeps $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ - && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \ - && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \ + && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ + \ + && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ + && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ @@ -42,8 +49,16 @@ RUN set -ex \ && make -j$(nproc) \ && 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" ] \ + \ +# explicit path to "pip3" to ensure distribution-provided "pip3" cannot interfere + && if [ ! -e /usr/local/bin/pip3 ]; then : \ + && wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \ + && python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \ + && rm /tmp/get-pip.py \ + ; fi \ + && pip3 install --no-cache-dir --upgrade "pip==$PYTHON_PIP_VERSION" \ + && [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ + \ && find /usr/local -depth \ \( \ \( -type d -a -name test -o -name tests \) \ @@ -55,7 +70,7 @@ RUN set -ex \ # make some useful symlinks that are expected to exist RUN cd /usr/local/bin \ - && ln -s easy_install-3.4 easy_install \ + && { [ -e easy_install ] || ln -s easy_install-* easy_install; } \ && ln -s idle3 idle \ && ln -s pydoc3 pydoc \ && ln -s python3 python \ diff --git a/3.4/alpine/Dockerfile b/3.4/alpine/Dockerfile index f00d78710..19dc70c98 100644 --- a/3.4/alpine/Dockerfile +++ b/3.4/alpine/Dockerfile @@ -1,5 +1,14 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + FROM alpine:3.4 +# ensure local python is preferred over distribution python +ENV PATH /usr/local/bin:$PATH + # http://bugs.python.org/issue19846 # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. ENV LANG C.UTF-8 @@ -8,18 +17,21 @@ ENV LANG C.UTF-8 # the other runtime dependencies for Python are installed later RUN apk add --no-cache ca-certificates -# gpg: key F73C700D: public key "Larry Hastings " imported ENV GPG_KEY 97FC712E4C024BBEA48A61ED3A5CA953F73C700D - ENV PYTHON_VERSION 3.4.5 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 8.1.2 RUN set -ex \ - && apk add --no-cache --virtual .fetch-deps curl gnupg tar xz \ - && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \ - && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \ + && apk add --no-cache --virtual .fetch-deps \ + gnupg \ + openssl \ + tar \ + xz \ + \ + && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ + && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ @@ -27,7 +39,6 @@ RUN set -ex \ && mkdir -p /usr/src/python \ && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \ && rm python.tar.xz \ - && apk del .fetch-deps \ \ && apk add --no-cache --virtual .build-deps \ bzip2-dev \ @@ -36,6 +47,7 @@ RUN set -ex \ linux-headers \ make \ ncurses-dev \ + openssl \ openssl-dev \ pax-utils \ readline-dev \ @@ -45,14 +57,25 @@ RUN set -ex \ tk-dev \ xz-dev \ zlib-dev \ +# add build deps before removing fetch deps in case there's overlap + && apk del .fetch-deps \ + \ && cd /usr/src/python \ && ./configure \ --enable-loadable-sqlite-extensions \ --enable-shared \ && 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" ] \ + \ +# explicit path to "pip3" to ensure distribution-provided "pip3" cannot interfere + && if [ ! -e /usr/local/bin/pip3 ]; then : \ + && wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \ + && python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \ + && rm /tmp/get-pip.py \ + ; fi \ + && pip3 install --no-cache-dir --upgrade "pip==$PYTHON_PIP_VERSION" \ + && [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ + \ && find /usr/local -depth \ \( \ \( -type d -a -name test -o -name tests \) \ @@ -72,7 +95,7 @@ RUN set -ex \ # make some useful symlinks that are expected to exist RUN cd /usr/local/bin \ - && ln -s easy_install-3.4 easy_install \ + && { [ -e easy_install ] || ln -s easy_install-* easy_install; } \ && ln -s idle3 idle \ && ln -s pydoc3 pydoc \ && ln -s python3 python \ diff --git a/3.4/onbuild/Dockerfile b/3.4/onbuild/Dockerfile index f0d01721c..892c9c321 100644 --- a/3.4/onbuild/Dockerfile +++ b/3.4/onbuild/Dockerfile @@ -1,3 +1,9 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + FROM python:3.4 RUN mkdir -p /usr/src/app diff --git a/3.4/slim/Dockerfile b/3.4/slim/Dockerfile index 17adf6129..89699fd6f 100644 --- a/3.4/slim/Dockerfile +++ b/3.4/slim/Dockerfile @@ -1,21 +1,26 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + FROM debian:jessie -# ensure local python is used over debian python +# ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH # http://bugs.python.org/issue19846 # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. ENV LANG C.UTF-8 +# runtime dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates \ libsqlite3-0 \ libssl1.0.0 \ && rm -rf /var/lib/apt/lists/* -# gpg: key F73C700D: public key "Larry Hastings " imported ENV GPG_KEY 97FC712E4C024BBEA48A61ED3A5CA953F73C700D - ENV PYTHON_VERSION 3.4.5 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" @@ -23,7 +28,6 @@ ENV PYTHON_PIP_VERSION 8.1.2 RUN set -ex \ && buildDeps=' \ - curl \ gcc \ libbz2-dev \ libc6-dev \ @@ -35,12 +39,14 @@ RUN set -ex \ make \ tcl-dev \ tk-dev \ + wget \ xz-utils \ zlib1g-dev \ ' \ && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ - && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \ - && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \ + \ + && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ + && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ @@ -56,8 +62,16 @@ RUN set -ex \ && make -j$(nproc) \ && 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" ] \ + \ +# explicit path to "pip3" to ensure distribution-provided "pip3" cannot interfere + && if [ ! -e /usr/local/bin/pip3 ]; then : \ + && wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \ + && python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \ + && rm /tmp/get-pip.py \ + ; fi \ + && pip3 install --no-cache-dir --upgrade "pip==$PYTHON_PIP_VERSION" \ + && [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ + \ && find /usr/local -depth \ \( \ \( -type d -a -name test -o -name tests \) \ @@ -69,7 +83,7 @@ RUN set -ex \ # make some useful symlinks that are expected to exist RUN cd /usr/local/bin \ - && ln -s easy_install-3.4 easy_install \ + && { [ -e easy_install ] || ln -s easy_install-* easy_install; } \ && ln -s idle3 idle \ && ln -s pydoc3 pydoc \ && ln -s python3 python \ diff --git a/3.4/wheezy/Dockerfile b/3.4/wheezy/Dockerfile index 9d52bc896..72eb6bddf 100644 --- a/3.4/wheezy/Dockerfile +++ b/3.4/wheezy/Dockerfile @@ -1,15 +1,25 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + FROM buildpack-deps:wheezy -# ensure local python is used over debian python +# ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH # http://bugs.python.org/issue19846 # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. ENV LANG C.UTF-8 -# gpg: key F73C700D: public key "Larry Hastings " imported -ENV GPG_KEY 97FC712E4C024BBEA48A61ED3A5CA953F73C700D +# runtime dependencies +RUN apt-get update && apt-get install -y --no-install-recommends \ + tcl \ + tk \ + && rm -rf /var/lib/apt/lists/* +ENV GPG_KEY 97FC712E4C024BBEA48A61ED3A5CA953F73C700D ENV PYTHON_VERSION 3.4.5 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" @@ -20,13 +30,10 @@ RUN set -ex \ tcl-dev \ tk-dev \ ' \ - && runDeps=' \ - tcl \ - tk \ - ' \ - && apt-get update && apt-get install -y $runDeps $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ - && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \ - && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \ + && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ + \ + && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ + && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ @@ -42,8 +49,16 @@ RUN set -ex \ && make -j$(nproc) \ && 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" ] \ + \ +# explicit path to "pip3" to ensure distribution-provided "pip3" cannot interfere + && if [ ! -e /usr/local/bin/pip3 ]; then : \ + && wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \ + && python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \ + && rm /tmp/get-pip.py \ + ; fi \ + && pip3 install --no-cache-dir --upgrade "pip==$PYTHON_PIP_VERSION" \ + && [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ + \ && find /usr/local -depth \ \( \ \( -type d -a -name test -o -name tests \) \ @@ -55,7 +70,7 @@ RUN set -ex \ # make some useful symlinks that are expected to exist RUN cd /usr/local/bin \ - && ln -s easy_install-3.4 easy_install \ + && { [ -e easy_install ] || ln -s easy_install-* easy_install; } \ && ln -s idle3 idle \ && ln -s pydoc3 pydoc \ && ln -s python3 python \ diff --git a/3.5/Dockerfile b/3.5/Dockerfile index a52b1588e..b9aa4ce0c 100644 --- a/3.5/Dockerfile +++ b/3.5/Dockerfile @@ -1,15 +1,25 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + FROM buildpack-deps:jessie -# ensure local python is used over debian python +# ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH # http://bugs.python.org/issue19846 # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. ENV LANG C.UTF-8 -# gpg: key F73C700D: public key "Larry Hastings " imported -ENV GPG_KEY 97FC712E4C024BBEA48A61ED3A5CA953F73C700D +# runtime dependencies +RUN apt-get update && apt-get install -y --no-install-recommends \ + tcl \ + tk \ + && rm -rf /var/lib/apt/lists/* +ENV GPG_KEY 97FC712E4C024BBEA48A61ED3A5CA953F73C700D ENV PYTHON_VERSION 3.5.2 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" @@ -20,13 +30,10 @@ RUN set -ex \ tcl-dev \ tk-dev \ ' \ - && runDeps=' \ - tcl \ - tk \ - ' \ - && apt-get update && apt-get install -y $runDeps $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ - && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \ - && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \ + && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ + \ + && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ + && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ @@ -42,8 +49,16 @@ RUN set -ex \ && make -j$(nproc) \ && 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" ] \ + \ +# explicit path to "pip3" to ensure distribution-provided "pip3" cannot interfere + && if [ ! -e /usr/local/bin/pip3 ]; then : \ + && wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \ + && python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \ + && rm /tmp/get-pip.py \ + ; fi \ + && pip3 install --no-cache-dir --upgrade "pip==$PYTHON_PIP_VERSION" \ + && [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ + \ && find /usr/local -depth \ \( \ \( -type d -a -name test -o -name tests \) \ @@ -55,7 +70,7 @@ RUN set -ex \ # make some useful symlinks that are expected to exist RUN cd /usr/local/bin \ - && ln -s easy_install-3.5 easy_install \ + && { [ -e easy_install ] || ln -s easy_install-* easy_install; } \ && ln -s idle3 idle \ && ln -s pydoc3 pydoc \ && ln -s python3 python \ diff --git a/3.5/alpine/Dockerfile b/3.5/alpine/Dockerfile index f21e0b72a..d368cbb8c 100644 --- a/3.5/alpine/Dockerfile +++ b/3.5/alpine/Dockerfile @@ -1,5 +1,14 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + FROM alpine:3.4 +# ensure local python is preferred over distribution python +ENV PATH /usr/local/bin:$PATH + # http://bugs.python.org/issue19846 # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. ENV LANG C.UTF-8 @@ -8,18 +17,21 @@ ENV LANG C.UTF-8 # the other runtime dependencies for Python are installed later RUN apk add --no-cache ca-certificates -# gpg: key F73C700D: public key "Larry Hastings " imported ENV GPG_KEY 97FC712E4C024BBEA48A61ED3A5CA953F73C700D - ENV PYTHON_VERSION 3.5.2 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 8.1.2 RUN set -ex \ - && apk add --no-cache --virtual .fetch-deps curl gnupg tar xz \ - && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \ - && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \ + && apk add --no-cache --virtual .fetch-deps \ + gnupg \ + openssl \ + tar \ + xz \ + \ + && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ + && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ @@ -27,7 +39,6 @@ RUN set -ex \ && mkdir -p /usr/src/python \ && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \ && rm python.tar.xz \ - && apk del .fetch-deps \ \ && apk add --no-cache --virtual .build-deps \ bzip2-dev \ @@ -36,6 +47,7 @@ RUN set -ex \ linux-headers \ make \ ncurses-dev \ + openssl \ openssl-dev \ pax-utils \ readline-dev \ @@ -45,14 +57,25 @@ RUN set -ex \ tk-dev \ xz-dev \ zlib-dev \ +# add build deps before removing fetch deps in case there's overlap + && apk del .fetch-deps \ + \ && cd /usr/src/python \ && ./configure \ --enable-loadable-sqlite-extensions \ --enable-shared \ && 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" ] \ + \ +# explicit path to "pip3" to ensure distribution-provided "pip3" cannot interfere + && if [ ! -e /usr/local/bin/pip3 ]; then : \ + && wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \ + && python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \ + && rm /tmp/get-pip.py \ + ; fi \ + && pip3 install --no-cache-dir --upgrade "pip==$PYTHON_PIP_VERSION" \ + && [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ + \ && find /usr/local -depth \ \( \ \( -type d -a -name test -o -name tests \) \ @@ -72,7 +95,7 @@ RUN set -ex \ # make some useful symlinks that are expected to exist RUN cd /usr/local/bin \ - && ln -s easy_install-3.5 easy_install \ + && { [ -e easy_install ] || ln -s easy_install-* easy_install; } \ && ln -s idle3 idle \ && ln -s pydoc3 pydoc \ && ln -s python3 python \ diff --git a/3.5/onbuild/Dockerfile b/3.5/onbuild/Dockerfile index 536d84822..45b1f2a39 100644 --- a/3.5/onbuild/Dockerfile +++ b/3.5/onbuild/Dockerfile @@ -1,3 +1,9 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + FROM python:3.5 RUN mkdir -p /usr/src/app diff --git a/3.5/slim/Dockerfile b/3.5/slim/Dockerfile index 4a5ed5644..d981a6a1e 100644 --- a/3.5/slim/Dockerfile +++ b/3.5/slim/Dockerfile @@ -1,21 +1,26 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + FROM debian:jessie -# ensure local python is used over debian python +# ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH # http://bugs.python.org/issue19846 # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. ENV LANG C.UTF-8 +# runtime dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates \ libsqlite3-0 \ libssl1.0.0 \ && rm -rf /var/lib/apt/lists/* -# gpg: key F73C700D: public key "Larry Hastings " imported ENV GPG_KEY 97FC712E4C024BBEA48A61ED3A5CA953F73C700D - ENV PYTHON_VERSION 3.5.2 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" @@ -23,7 +28,6 @@ ENV PYTHON_PIP_VERSION 8.1.2 RUN set -ex \ && buildDeps=' \ - curl \ gcc \ libbz2-dev \ libc6-dev \ @@ -35,12 +39,14 @@ RUN set -ex \ make \ tcl-dev \ tk-dev \ + wget \ xz-utils \ zlib1g-dev \ ' \ && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ - && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \ - && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \ + \ + && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ + && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ @@ -56,8 +62,16 @@ RUN set -ex \ && make -j$(nproc) \ && 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" ] \ + \ +# explicit path to "pip3" to ensure distribution-provided "pip3" cannot interfere + && if [ ! -e /usr/local/bin/pip3 ]; then : \ + && wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \ + && python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \ + && rm /tmp/get-pip.py \ + ; fi \ + && pip3 install --no-cache-dir --upgrade "pip==$PYTHON_PIP_VERSION" \ + && [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ + \ && find /usr/local -depth \ \( \ \( -type d -a -name test -o -name tests \) \ @@ -69,7 +83,7 @@ RUN set -ex \ # make some useful symlinks that are expected to exist RUN cd /usr/local/bin \ - && ln -s easy_install-3.5 easy_install \ + && { [ -e easy_install ] || ln -s easy_install-* easy_install; } \ && ln -s idle3 idle \ && ln -s pydoc3 pydoc \ && ln -s python3 python \ From f1bc9f790605ecf0dabce4c24ef9ee5ce205e496 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 8 Aug 2016 13:50:24 -0700 Subject: [PATCH 09/29] Apply template to python:2.7 and python:3.6 which don't currently get the templates applied directly --- 2.7/Dockerfile | 31 ++++++++++++++++++------------- 2.7/alpine/Dockerfile | 32 +++++++++++++++++++++++--------- 2.7/slim/Dockerfile | 22 +++++++++++++--------- 2.7/wheezy/Dockerfile | 31 ++++++++++++++++++------------- 3.6/Dockerfile | 35 ++++++++++++++++++++++------------- 3.6/alpine/Dockerfile | 35 ++++++++++++++++++++++++++--------- 3.6/slim/Dockerfile | 26 +++++++++++++++++--------- 7 files changed, 137 insertions(+), 75 deletions(-) diff --git a/2.7/Dockerfile b/2.7/Dockerfile index ea1dc0837..2ca772a3a 100644 --- a/2.7/Dockerfile +++ b/2.7/Dockerfile @@ -1,15 +1,19 @@ FROM buildpack-deps:jessie -# ensure local python is used over debian python +# ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH # http://bugs.python.org/issue19846 # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. ENV LANG C.UTF-8 -# gpg: key 18ADD4FF: public key "Benjamin Peterson " imported -ENV GPG_KEY C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF +# runtime dependencies +RUN apt-get update && apt-get install -y --no-install-recommends \ + tcl \ + tk \ + && rm -rf /var/lib/apt/lists/* +ENV GPG_KEY C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF ENV PYTHON_VERSION 2.7.12 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" @@ -20,13 +24,10 @@ RUN set -ex \ tcl-dev \ tk-dev \ ' \ - && runDeps=' \ - tcl \ - tk \ - ' \ - && apt-get update && apt-get install -y $runDeps $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ - && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \ - && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \ + && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ + \ + && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ + && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ @@ -42,9 +43,13 @@ RUN set -ex \ && make -j$(nproc) \ && make install \ && 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" ] \ + \ + && wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \ + && python2 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \ + && rm /tmp/get-pip.py \ + && pip install --no-cache-dir --upgrade "pip==$PYTHON_PIP_VERSION" \ + && [ "$(pip list |tac|tac| 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 ff36e0f5c..dd70b8c2b 100644 --- a/2.7/alpine/Dockerfile +++ b/2.7/alpine/Dockerfile @@ -1,5 +1,8 @@ FROM alpine:3.4 +# ensure local python is preferred over distribution python +ENV PATH /usr/local/bin:$PATH + # http://bugs.python.org/issue19846 # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. ENV LANG C.UTF-8 @@ -8,18 +11,21 @@ ENV LANG C.UTF-8 # the other runtime dependencies for Python are installed later RUN apk add --no-cache ca-certificates -# gpg: key 18ADD4FF: public key "Benjamin Peterson " imported ENV GPG_KEY C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF - ENV PYTHON_VERSION 2.7.12 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 8.1.2 RUN set -ex \ - && apk add --no-cache --virtual .fetch-deps curl gnupg tar xz \ - && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \ - && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \ + && apk add --no-cache --virtual .fetch-deps \ + gnupg \ + openssl \ + tar \ + xz \ + \ + && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ + && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ @@ -35,6 +41,7 @@ RUN set -ex \ linux-headers \ make \ ncurses-dev \ + openssl \ openssl-dev \ pax-utils \ readline-dev \ @@ -43,15 +50,22 @@ RUN set -ex \ tk \ tk-dev \ zlib-dev \ +# add build deps before removing fetch deps in case there's overlap + && apk del .fetch-deps \ + \ && cd /usr/src/python \ && ./configure \ --enable-shared \ --enable-unicode=ucs4 \ && make -j$(getconf _NPROCESSORS_ONLN) \ && 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" ] \ + \ + && wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \ + && python2 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \ + && rm /tmp/get-pip.py \ + && pip install --no-cache-dir --upgrade "pip==$PYTHON_PIP_VERSION" \ + && [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ + \ && find /usr/local -depth \ \( \ \( -type d -a -name test -o -name tests \) \ @@ -66,7 +80,7 @@ RUN set -ex \ | sort -u \ )" \ && apk add --virtual .python-rundeps $runDeps \ - && apk del .build-deps .fetch-deps \ + && apk del .build-deps \ && rm -rf /usr/src/python ~/.cache CMD ["python2"] diff --git a/2.7/slim/Dockerfile b/2.7/slim/Dockerfile index ee7b1cd09..821a3d52d 100644 --- a/2.7/slim/Dockerfile +++ b/2.7/slim/Dockerfile @@ -1,21 +1,20 @@ FROM debian:jessie -# ensure local python is used over debian python +# ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH # http://bugs.python.org/issue19846 # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. ENV LANG C.UTF-8 +# runtime dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates \ libsqlite3-0 \ libssl1.0.0 \ && rm -rf /var/lib/apt/lists/* -# gpg: key 18ADD4FF: public key "Benjamin Peterson " imported ENV GPG_KEY C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF - ENV PYTHON_VERSION 2.7.12 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" @@ -23,7 +22,6 @@ ENV PYTHON_PIP_VERSION 8.1.2 RUN set -ex \ && buildDeps=' \ - curl \ gcc \ libbz2-dev \ libc6-dev \ @@ -34,12 +32,14 @@ RUN set -ex \ make \ tcl-dev \ tk-dev \ + wget \ xz-utils \ zlib1g-dev \ ' \ && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ - && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \ - && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \ + \ + && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ + && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ @@ -55,9 +55,13 @@ RUN set -ex \ && make -j$(nproc) \ && make install \ && 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" ] \ + \ + && wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \ + && python2 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \ + && rm /tmp/get-pip.py \ + && pip install --no-cache-dir --upgrade "pip==$PYTHON_PIP_VERSION" \ + && [ "$(pip list |tac|tac| 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 e68c736af..ac5182b09 100644 --- a/2.7/wheezy/Dockerfile +++ b/2.7/wheezy/Dockerfile @@ -1,15 +1,19 @@ FROM buildpack-deps:wheezy -# ensure local python is used over debian python +# ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH # http://bugs.python.org/issue19846 # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. ENV LANG C.UTF-8 -# gpg: key 18ADD4FF: public key "Benjamin Peterson " imported -ENV GPG_KEY C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF +# runtime dependencies +RUN apt-get update && apt-get install -y --no-install-recommends \ + tcl \ + tk \ + && rm -rf /var/lib/apt/lists/* +ENV GPG_KEY C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF ENV PYTHON_VERSION 2.7.12 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" @@ -20,13 +24,10 @@ RUN set -ex \ tcl-dev \ tk-dev \ ' \ - && runDeps=' \ - tcl \ - tk \ - ' \ - && apt-get update && apt-get install -y $runDeps $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ - && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \ - && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \ + && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ + \ + && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ + && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ @@ -42,9 +43,13 @@ RUN set -ex \ && make -j$(nproc) \ && make install \ && 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" ] \ + \ + && wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \ + && python2 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \ + && rm /tmp/get-pip.py \ + && pip install --no-cache-dir --upgrade "pip==$PYTHON_PIP_VERSION" \ + && [ "$(pip list |tac|tac| 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.6/Dockerfile b/3.6/Dockerfile index 7652dc62e..fff6d7720 100644 --- a/3.6/Dockerfile +++ b/3.6/Dockerfile @@ -1,15 +1,19 @@ FROM buildpack-deps:jessie -# ensure local python is used over debian python +# ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH # http://bugs.python.org/issue19846 # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. ENV LANG C.UTF-8 -# gpg: key AA65421D: public key "Ned Deily (Python release signing key) " imported -ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D +# runtime dependencies +RUN apt-get update && apt-get install -y --no-install-recommends \ + tcl \ + tk \ + && rm -rf /var/lib/apt/lists/* +ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D ENV PYTHON_VERSION 3.6.0a3 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" @@ -20,13 +24,10 @@ RUN set -ex \ tcl-dev \ tk-dev \ ' \ - && runDeps=' \ - tcl \ - tk \ - ' \ - && apt-get update && apt-get install -y $runDeps $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ - && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \ - && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \ + && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ + \ + && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ + && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ @@ -42,8 +43,16 @@ RUN set -ex \ && make -j$(nproc) \ && 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" ] \ + \ +# explicit path to "pip3" to ensure distribution-provided "pip3" cannot interfere + && if [ ! -e /usr/local/bin/pip3 ]; then : \ + && wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \ + && python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \ + && rm /tmp/get-pip.py \ + ; fi \ + && pip3 install --no-cache-dir --upgrade "pip==$PYTHON_PIP_VERSION" \ + && [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ + \ && find /usr/local -depth \ \( \ \( -type d -a -name test -o -name tests \) \ @@ -55,7 +64,7 @@ RUN set -ex \ # make some useful symlinks that are expected to exist RUN cd /usr/local/bin \ - && ln -s easy_install-3.6 easy_install \ + && { [ -e easy_install ] || ln -s easy_install-* easy_install; } \ && ln -s idle3 idle \ && ln -s pydoc3 pydoc \ && ln -s python3 python \ diff --git a/3.6/alpine/Dockerfile b/3.6/alpine/Dockerfile index 03a13bd12..96bedb99e 100644 --- a/3.6/alpine/Dockerfile +++ b/3.6/alpine/Dockerfile @@ -1,5 +1,8 @@ FROM alpine:3.4 +# ensure local python is preferred over distribution python +ENV PATH /usr/local/bin:$PATH + # http://bugs.python.org/issue19846 # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. ENV LANG C.UTF-8 @@ -8,18 +11,21 @@ ENV LANG C.UTF-8 # the other runtime dependencies for Python are installed later RUN apk add --no-cache ca-certificates -# gpg: key AA65421D: public key "Ned Deily (Python release signing key) " imported ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D - ENV PYTHON_VERSION 3.6.0a3 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 8.1.2 RUN set -ex \ - && apk add --no-cache --virtual .fetch-deps curl gnupg tar xz \ - && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \ - && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \ + && apk add --no-cache --virtual .fetch-deps \ + gnupg \ + openssl \ + tar \ + xz \ + \ + && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ + && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ @@ -27,7 +33,6 @@ RUN set -ex \ && mkdir -p /usr/src/python \ && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \ && rm python.tar.xz \ - && apk del .fetch-deps \ \ && apk add --no-cache --virtual .build-deps \ bzip2-dev \ @@ -36,6 +41,7 @@ RUN set -ex \ linux-headers \ make \ ncurses-dev \ + openssl \ openssl-dev \ pax-utils \ readline-dev \ @@ -45,14 +51,25 @@ RUN set -ex \ tk-dev \ xz-dev \ zlib-dev \ +# add build deps before removing fetch deps in case there's overlap + && apk del .fetch-deps \ + \ && cd /usr/src/python \ && ./configure \ --enable-loadable-sqlite-extensions \ --enable-shared \ && 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" ] \ + \ +# explicit path to "pip3" to ensure distribution-provided "pip3" cannot interfere + && if [ ! -e /usr/local/bin/pip3 ]; then : \ + && wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \ + && python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \ + && rm /tmp/get-pip.py \ + ; fi \ + && pip3 install --no-cache-dir --upgrade "pip==$PYTHON_PIP_VERSION" \ + && [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ + \ && find /usr/local -depth \ \( \ \( -type d -a -name test -o -name tests \) \ @@ -72,7 +89,7 @@ RUN set -ex \ # make some useful symlinks that are expected to exist RUN cd /usr/local/bin \ - && ln -s easy_install-3.6 easy_install \ + && { [ -e easy_install ] || ln -s easy_install-* easy_install; } \ && ln -s idle3 idle \ && ln -s pydoc3 pydoc \ && ln -s python3 python \ diff --git a/3.6/slim/Dockerfile b/3.6/slim/Dockerfile index 5ceb89df0..75dbc9136 100644 --- a/3.6/slim/Dockerfile +++ b/3.6/slim/Dockerfile @@ -1,21 +1,20 @@ FROM debian:jessie -# ensure local python is used over debian python +# ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH # http://bugs.python.org/issue19846 # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. ENV LANG C.UTF-8 +# runtime dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates \ libsqlite3-0 \ libssl1.0.0 \ && rm -rf /var/lib/apt/lists/* -# gpg: key AA65421D: public key "Ned Deily (Python release signing key) " imported ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D - ENV PYTHON_VERSION 3.6.0a3 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" @@ -23,7 +22,6 @@ ENV PYTHON_PIP_VERSION 8.1.2 RUN set -ex \ && buildDeps=' \ - curl \ gcc \ libbz2-dev \ libc6-dev \ @@ -35,12 +33,14 @@ RUN set -ex \ make \ tcl-dev \ tk-dev \ + wget \ xz-utils \ zlib1g-dev \ ' \ && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ - && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \ - && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \ + \ + && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ + && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ @@ -56,8 +56,16 @@ RUN set -ex \ && make -j$(nproc) \ && 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" ] \ + \ +# explicit path to "pip3" to ensure distribution-provided "pip3" cannot interfere + && if [ ! -e /usr/local/bin/pip3 ]; then : \ + && wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \ + && python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \ + && rm /tmp/get-pip.py \ + ; fi \ + && pip3 install --no-cache-dir --upgrade "pip==$PYTHON_PIP_VERSION" \ + && [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ + \ && find /usr/local -depth \ \( \ \( -type d -a -name test -o -name tests \) \ @@ -69,7 +77,7 @@ RUN set -ex \ # make some useful symlinks that are expected to exist RUN cd /usr/local/bin \ - && ln -s easy_install-3.6 easy_install \ + && { [ -e easy_install ] || ln -s easy_install-* easy_install; } \ && ln -s idle3 idle \ && ln -s pydoc3 pydoc \ && ln -s python3 python \ From e982a6b8362c94a525945cb072b5dc16a9726a77 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 8 Aug 2016 16:33:57 -0700 Subject: [PATCH 10/29] Add build-time headers/packages for "import dbm" to work properly on 2.7 slim and alpine variants --- 2.7/alpine/Dockerfile | 1 + 2.7/slim/Dockerfile | 1 + 2 files changed, 2 insertions(+) diff --git a/2.7/alpine/Dockerfile b/2.7/alpine/Dockerfile index ff36e0f5c..198b83cde 100644 --- a/2.7/alpine/Dockerfile +++ b/2.7/alpine/Dockerfile @@ -31,6 +31,7 @@ RUN set -ex \ && apk add --no-cache --virtual .build-deps \ bzip2-dev \ gcc \ + gdbm-dev \ libc-dev \ linux-headers \ make \ diff --git a/2.7/slim/Dockerfile b/2.7/slim/Dockerfile index ee7b1cd09..7cbedba14 100644 --- a/2.7/slim/Dockerfile +++ b/2.7/slim/Dockerfile @@ -27,6 +27,7 @@ RUN set -ex \ gcc \ libbz2-dev \ libc6-dev \ + libdb-dev \ libncurses-dev \ libreadline-dev \ libsqlite3-dev \ From 4a4688a07e5437f167758e6e88f68fe0125e57f0 Mon Sep 17 00:00:00 2001 From: Boris FELD Date: Wed, 17 Aug 2016 10:05:51 +0200 Subject: [PATCH 11/29] Add a narrow python2.7 build dockerimage --- 2.7/narrow/Dockerfile | 71 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 2.7/narrow/Dockerfile diff --git a/2.7/narrow/Dockerfile b/2.7/narrow/Dockerfile new file mode 100644 index 000000000..7e9a77f98 --- /dev/null +++ b/2.7/narrow/Dockerfile @@ -0,0 +1,71 @@ +FROM buildpack-deps:jessie + +# divert many traces of Debian Python (so that they are not used by mistake) +# https://bugs.debian.org/33263 :( +RUN set -ex \ + && for bits in \ +# /etc/python* \ + /usr/bin/*2to3* \ + /usr/bin/*python* \ + /usr/bin/pdb* \ + /usr/bin/py* \ +# /usr/lib/python* \ +# /usr/share/python \ + ; do \ + dpkg-divert --rename "$bits"; \ + done + +# http://bugs.python.org/issue19846 +# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. +ENV LANG C.UTF-8 + +# gpg: key 18ADD4FF: public key "Benjamin Peterson " imported +ENV GPG_KEY C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF + +ENV PYTHON_VERSION 2.7.12 + +# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" +ENV PYTHON_PIP_VERSION 8.1.2 + +RUN set -ex \ + && buildDeps=' \ + tcl-dev \ + tk-dev \ + ' \ + && runDeps=' \ + tcl \ + tk \ + ' \ + && apt-get update && apt-get install -y $runDeps $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ + && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \ + && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \ + && export GNUPGHOME="$(mktemp -d)" \ + && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && gpg --batch --verify python.tar.xz.asc python.tar.xz \ + && rm -r "$GNUPGHOME" python.tar.xz.asc \ + && mkdir -p /usr/src/python \ + && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \ + && rm python.tar.xz \ + \ + && cd /usr/src/python \ + && ./configure \ + --enable-unicode=ucs2 \ + && make -j$(nproc) \ + && make install \ + && 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 \) \ + -o \ + \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \) -exec rm -rf '{}' + \ + && apt-get purge -y --auto-remove $buildDeps \ + && rm -rf /usr/src/python ~/.cache + +# install "virtualenv", since the vast majority of users of this image will want it +RUN pip install --no-cache-dir virtualenv + +CMD ["python2"] From 1ad743decae71db424840812eb8dd49557aed9d0 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Thu, 18 Aug 2016 11:50:26 -0700 Subject: [PATCH 12/29] Add "windowsservercore" variants --- 2.7/windows/windowsservercore/Dockerfile | 51 +++++++++++++++++++++++ 3.5/windows/windowsservercore/Dockerfile | 52 ++++++++++++++++++++++++ 3.6/windows/windowsservercore/Dockerfile | 46 +++++++++++++++++++++ Dockerfile-windowsservercore.template | 46 +++++++++++++++++++++ generate-stackbrew-library.sh | 15 +++++-- update.sh | 7 +++- 6 files changed, 212 insertions(+), 5 deletions(-) create mode 100644 2.7/windows/windowsservercore/Dockerfile create mode 100644 3.5/windows/windowsservercore/Dockerfile create mode 100644 3.6/windows/windowsservercore/Dockerfile create mode 100644 Dockerfile-windowsservercore.template diff --git a/2.7/windows/windowsservercore/Dockerfile b/2.7/windows/windowsservercore/Dockerfile new file mode 100644 index 000000000..901c8137a --- /dev/null +++ b/2.7/windows/windowsservercore/Dockerfile @@ -0,0 +1,51 @@ +FROM microsoft/windowsservercore + +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"] + +ENV PYTHON_VERSION 2.7.12 +ENV PYTHON_RELEASE 2.7.12 + +# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" +ENV PYTHON_PIP_VERSION 8.1.2 + +RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}.amd64.msi' -f $env:PYTHON_RELEASE, $env:PYTHON_VERSION); \ + Write-Host ('Downloading {0} ...' -f $url); \ + (New-Object System.Net.WebClient).DownloadFile($url, 'python.msi'); \ + \ + Write-Host 'Installing ...'; \ +# https://www.python.org/download/releases/2.4/msi/ + Start-Process msiexec -Wait \ + -ArgumentList @( \ + '/i', \ + 'python.msi', \ + '/quiet', \ + '/qn', \ + 'TARGETDIR=C:\Python', \ + 'ALLUSERS=1', \ + 'ADDLOCAL=DefaultFeature,Extensions,TclTk,Tools,PrependPath' \ + ); \ + \ +# the installer updated PATH, so we should refresh our local value + $env:PATH = [Environment]::GetEnvironmentVariable('PATH', [EnvironmentVariableTarget]::Machine); \ + \ + Write-Host 'Verifying install ...'; \ + Write-Host ' python --version'; python --version; \ + \ + Write-Host 'Removing ...'; \ + Remove-Item python.msi -Force; \ + \ + $pipInstall = ('pip=={0}' -f $env:PYTHON_PIP_VERSION); \ + Write-Host ('Installing {0} ...' -f $pipInstall); \ + (New-Object System.Net.WebClient).DownloadFile('https://bootstrap.pypa.io/get-pip.py', 'get-pip.py'); \ + python get-pip.py $pipInstall; \ + Remove-Item get-pip.py -Force; \ + \ + Write-Host 'Verifying pip install ...'; \ + pip --version; \ + \ + Write-Host 'Complete.'; + +# install "virtualenv", since the vast majority of users of this image will want it +RUN pip install --no-cache-dir virtualenv + +CMD ["python"] diff --git a/3.5/windows/windowsservercore/Dockerfile b/3.5/windows/windowsservercore/Dockerfile new file mode 100644 index 000000000..917dfb075 --- /dev/null +++ b/3.5/windows/windowsservercore/Dockerfile @@ -0,0 +1,52 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM microsoft/windowsservercore + +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"] + +ENV PYTHON_VERSION 3.5.2 +ENV PYTHON_RELEASE 3.5.2 + +# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" +ENV PYTHON_PIP_VERSION 8.1.2 + +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); \ + (New-Object System.Net.WebClient).DownloadFile($url, 'python.exe'); \ + \ + Write-Host 'Installing ...'; \ +# https://docs.python.org/3.5/using/windows.html#installing-without-ui + Start-Process python.exe -Wait \ + -ArgumentList @( \ + '/quiet', \ + 'InstallAllUsers=1', \ + 'TargetDir=C:\Python', \ + 'PrependPath=1', \ + 'Shortcuts=0', \ + 'Include_doc=0', \ + 'Include_test=0' \ + ); \ + \ +# the installer updated PATH, so we should refresh our local value + $env:PATH = [Environment]::GetEnvironmentVariable('PATH', [EnvironmentVariableTarget]::Machine); \ + \ + Write-Host 'Verifying install ...'; \ + Write-Host ' python --version'; python --version; \ + \ + Write-Host 'Removing ...'; \ + Remove-Item python.exe -Force; \ + \ + $pipInstall = ('pip=={0}' -f $env:PYTHON_PIP_VERSION); \ + Write-Host ('Installing {0} ...' -f $pipInstall); \ + pip install --no-cache-dir --upgrade $pipInstall; \ + \ + Write-Host 'Verifying pip install ...'; \ + pip --version; \ + \ + Write-Host 'Complete.'; + +CMD ["python"] diff --git a/3.6/windows/windowsservercore/Dockerfile b/3.6/windows/windowsservercore/Dockerfile new file mode 100644 index 000000000..ec45dc550 --- /dev/null +++ b/3.6/windows/windowsservercore/Dockerfile @@ -0,0 +1,46 @@ +FROM microsoft/windowsservercore + +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"] + +ENV PYTHON_VERSION 3.6.0a3 +ENV PYTHON_RELEASE 3.6.0 + +# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" +ENV PYTHON_PIP_VERSION 8.1.2 + +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); \ + (New-Object System.Net.WebClient).DownloadFile($url, 'python.exe'); \ + \ + Write-Host 'Installing ...'; \ +# https://docs.python.org/3.5/using/windows.html#installing-without-ui + Start-Process python.exe -Wait \ + -ArgumentList @( \ + '/quiet', \ + 'InstallAllUsers=1', \ + 'TargetDir=C:\Python', \ + 'PrependPath=1', \ + 'Shortcuts=0', \ + 'Include_doc=0', \ + 'Include_test=0' \ + ); \ + \ +# the installer updated PATH, so we should refresh our local value + $env:PATH = [Environment]::GetEnvironmentVariable('PATH', [EnvironmentVariableTarget]::Machine); \ + \ + Write-Host 'Verifying install ...'; \ + Write-Host ' python --version'; python --version; \ + \ + Write-Host 'Removing ...'; \ + Remove-Item python.exe -Force; \ + \ + $pipInstall = ('pip=={0}' -f $env:PYTHON_PIP_VERSION); \ + Write-Host ('Installing {0} ...' -f $pipInstall); \ + pip install --no-cache-dir --upgrade $pipInstall; \ + \ + Write-Host 'Verifying pip install ...'; \ + pip --version; \ + \ + Write-Host 'Complete.'; + +CMD ["python"] diff --git a/Dockerfile-windowsservercore.template b/Dockerfile-windowsservercore.template new file mode 100644 index 000000000..d74d0f9c7 --- /dev/null +++ b/Dockerfile-windowsservercore.template @@ -0,0 +1,46 @@ +FROM microsoft/windowsservercore + +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"] + +ENV PYTHON_VERSION %%PLACEHOLDER%% +ENV PYTHON_RELEASE %%PLACEHOLDER%% + +# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" +ENV PYTHON_PIP_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); \ + (New-Object System.Net.WebClient).DownloadFile($url, 'python.exe'); \ + \ + Write-Host 'Installing ...'; \ +# https://docs.python.org/3.5/using/windows.html#installing-without-ui + Start-Process python.exe -Wait \ + -ArgumentList @( \ + '/quiet', \ + 'InstallAllUsers=1', \ + 'TargetDir=C:\Python', \ + 'PrependPath=1', \ + 'Shortcuts=0', \ + 'Include_doc=0', \ + 'Include_test=0' \ + ); \ + \ +# the installer updated PATH, so we should refresh our local value + $env:PATH = [Environment]::GetEnvironmentVariable('PATH', [EnvironmentVariableTarget]::Machine); \ + \ + Write-Host 'Verifying install ...'; \ + Write-Host ' python --version'; python --version; \ + \ + Write-Host 'Removing ...'; \ + Remove-Item python.exe -Force; \ + \ + $pipInstall = ('pip=={0}' -f $env:PYTHON_PIP_VERSION); \ + Write-Host ('Installing {0} ...' -f $pipInstall); \ + pip install --no-cache-dir --upgrade $pipInstall; \ + \ + Write-Host 'Verifying pip install ...'; \ + pip --version; \ + \ + Write-Host 'Complete.'; + +CMD ["python"] diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 8b166f2e8..92bf0e3b9 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -67,10 +67,16 @@ for version in "${versions[@]}"; do Directory: $version EOE - for variant in slim alpine wheezy onbuild; do - [ -f "$version/$variant/Dockerfile" ] || continue + for v in \ + slim alpine wheezy onbuild \ + windows/windowsservercore windows/nanoserver \ + ; do + dir="$version/$v" + variant="$(basename "$v")" - commit="$(dirCommit "$version/$variant")" + [ -f "$dir/Dockerfile" ] || continue + + commit="$(dirCommit "$dir")" variantAliases=( "${versionAliases[@]/%/-$variant}" ) variantAliases=( "${variantAliases[@]//latest-/}" ) @@ -79,7 +85,8 @@ for version in "${versions[@]}"; do cat <<-EOE Tags: $(join ', ' "${variantAliases[@]}") GitCommit: $commit - Directory: $version/$variant + Directory: $dir EOE + [ "$variant" = "$v" ] || echo "Constraints: $variant" done done diff --git a/update.sh b/update.sh index 3a363a614..fae90ae29 100755 --- a/update.sh +++ b/update.sh @@ -1,5 +1,6 @@ #!/bin/bash set -e +shopt -s nullglob declare -A gpgKeys=( # gpg: key 18ADD4FF: public key "Benjamin Peterson " imported @@ -65,12 +66,15 @@ for version in "${versions[@]}"; do alpine \ slim \ onbuild \ + windows/windowsservercore \ ; do if [ "$variant" = 'debian' ]; then dir="$version" else dir="$version/$variant" + variant="$(basename "$variant")" fi + [ -d "$dir" ] || continue template="Dockerfile-$variant.template" { generated_warning; cat "$template"; } > "$dir/Dockerfile" done @@ -84,9 +88,10 @@ for version in "${versions[@]}"; do sed -ri \ -e 's/^(ENV GPG_KEY) .*/\1 '"${gpgKeys[$version]}"'/' \ -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/^(FROM python):.*/\1:'"$version"'/' \ - "$version"/{,*/}Dockerfile + "$version"/{,*/,*/*/}Dockerfile ) fi for variant in wheezy alpine slim; do From ed918799074f83fa86885426fc70a9757fe8fc3b Mon Sep 17 00:00:00 2001 From: Jamie Hewland Date: Fri, 19 Aug 2016 09:14:55 +0200 Subject: [PATCH 13/29] Python 3.6.0a4 --- 3.6/Dockerfile | 2 +- 3.6/alpine/Dockerfile | 2 +- 3.6/slim/Dockerfile | 2 +- 3.6/windows/windowsservercore/Dockerfile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/3.6/Dockerfile b/3.6/Dockerfile index fff6d7720..4797fa686 100644 --- a/3.6/Dockerfile +++ b/3.6/Dockerfile @@ -14,7 +14,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.6.0a3 +ENV PYTHON_VERSION 3.6.0a4 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 8.1.2 diff --git a/3.6/alpine/Dockerfile b/3.6/alpine/Dockerfile index 96bedb99e..7314fb7ce 100644 --- a/3.6/alpine/Dockerfile +++ b/3.6/alpine/Dockerfile @@ -12,7 +12,7 @@ ENV LANG C.UTF-8 RUN apk add --no-cache ca-certificates ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.6.0a3 +ENV PYTHON_VERSION 3.6.0a4 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 8.1.2 diff --git a/3.6/slim/Dockerfile b/3.6/slim/Dockerfile index 75dbc9136..067dd29e5 100644 --- a/3.6/slim/Dockerfile +++ b/3.6/slim/Dockerfile @@ -15,7 +15,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.6.0a3 +ENV PYTHON_VERSION 3.6.0a4 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 8.1.2 diff --git a/3.6/windows/windowsservercore/Dockerfile b/3.6/windows/windowsservercore/Dockerfile index ec45dc550..49b5104c0 100644 --- a/3.6/windows/windowsservercore/Dockerfile +++ b/3.6/windows/windowsservercore/Dockerfile @@ -2,7 +2,7 @@ FROM microsoft/windowsservercore SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"] -ENV PYTHON_VERSION 3.6.0a3 +ENV PYTHON_VERSION 3.6.0a4 ENV PYTHON_RELEASE 3.6.0 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" From 855b85c8309e925814dfa97d61310080dcd08db6 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Fri, 19 Aug 2016 09:25:00 -0700 Subject: [PATCH 14/29] Add "--force-reinstall" and a comment as to why to our "pip install" lines --- 2.7/Dockerfile | 7 ++++++- 2.7/alpine/Dockerfile | 7 ++++++- 2.7/slim/Dockerfile | 7 ++++++- 2.7/wheezy/Dockerfile | 7 ++++++- 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.5/windows/windowsservercore/Dockerfile | 5 ++++- 3.6/Dockerfile | 7 ++++++- 3.6/alpine/Dockerfile | 7 ++++++- 3.6/slim/Dockerfile | 7 ++++++- 3.6/windows/windowsservercore/Dockerfile | 5 ++++- Dockerfile-alpine.template | 7 ++++++- Dockerfile-debian.template | 7 ++++++- Dockerfile-slim.template | 7 ++++++- Dockerfile-windowsservercore.template | 5 ++++- 24 files changed, 138 insertions(+), 24 deletions(-) diff --git a/2.7/Dockerfile b/2.7/Dockerfile index 2ca772a3a..e56901f64 100644 --- a/2.7/Dockerfile +++ b/2.7/Dockerfile @@ -47,7 +47,12 @@ RUN set -ex \ && wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \ && python2 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \ && rm /tmp/get-pip.py \ - && pip install --no-cache-dir --upgrade "pip==$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 "pip==$PYTHON_PIP_VERSION" \ +# then we use "pip list" to ensure we don't have more than one pip version installed +# https://github.com/docker-library/python/pull/100 && [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ \ && find /usr/local -depth \ diff --git a/2.7/alpine/Dockerfile b/2.7/alpine/Dockerfile index 302efeec8..2c53d0cb1 100644 --- a/2.7/alpine/Dockerfile +++ b/2.7/alpine/Dockerfile @@ -64,7 +64,12 @@ RUN set -ex \ && wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \ && python2 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \ && rm /tmp/get-pip.py \ - && pip install --no-cache-dir --upgrade "pip==$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 "pip==$PYTHON_PIP_VERSION" \ +# then we use "pip list" to ensure we don't have more than one pip version installed +# https://github.com/docker-library/python/pull/100 && [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ \ && find /usr/local -depth \ diff --git a/2.7/slim/Dockerfile b/2.7/slim/Dockerfile index 11a392283..6e656bc22 100644 --- a/2.7/slim/Dockerfile +++ b/2.7/slim/Dockerfile @@ -60,7 +60,12 @@ RUN set -ex \ && wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \ && python2 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \ && rm /tmp/get-pip.py \ - && pip install --no-cache-dir --upgrade "pip==$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 "pip==$PYTHON_PIP_VERSION" \ +# then we use "pip list" to ensure we don't have more than one pip version installed +# https://github.com/docker-library/python/pull/100 && [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ \ && find /usr/local -depth \ diff --git a/2.7/wheezy/Dockerfile b/2.7/wheezy/Dockerfile index ac5182b09..6c3b68436 100644 --- a/2.7/wheezy/Dockerfile +++ b/2.7/wheezy/Dockerfile @@ -47,7 +47,12 @@ RUN set -ex \ && wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \ && python2 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \ && rm /tmp/get-pip.py \ - && pip install --no-cache-dir --upgrade "pip==$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 "pip==$PYTHON_PIP_VERSION" \ +# then we use "pip list" to ensure we don't have more than one pip version installed +# https://github.com/docker-library/python/pull/100 && [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ \ && find /usr/local -depth \ diff --git a/3.3/Dockerfile b/3.3/Dockerfile index c9784367b..ee3062605 100644 --- a/3.3/Dockerfile +++ b/3.3/Dockerfile @@ -56,7 +56,12 @@ RUN set -ex \ && python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \ && rm /tmp/get-pip.py \ ; fi \ - && pip3 install --no-cache-dir --upgrade "pip==$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 + && pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \ +# then we use "pip list" to ensure we don't have more than one pip version installed +# https://github.com/docker-library/python/pull/100 && [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ \ && find /usr/local -depth \ diff --git a/3.3/alpine/Dockerfile b/3.3/alpine/Dockerfile index b04660e17..a4af10164 100644 --- a/3.3/alpine/Dockerfile +++ b/3.3/alpine/Dockerfile @@ -73,7 +73,12 @@ RUN set -ex \ && python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \ && rm /tmp/get-pip.py \ ; fi \ - && pip3 install --no-cache-dir --upgrade "pip==$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 + && pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \ +# then we use "pip list" to ensure we don't have more than one pip version installed +# https://github.com/docker-library/python/pull/100 && [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ \ && find /usr/local -depth \ diff --git a/3.3/slim/Dockerfile b/3.3/slim/Dockerfile index a12e09c9e..847fc3c85 100644 --- a/3.3/slim/Dockerfile +++ b/3.3/slim/Dockerfile @@ -69,7 +69,12 @@ RUN set -ex \ && python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \ && rm /tmp/get-pip.py \ ; fi \ - && pip3 install --no-cache-dir --upgrade "pip==$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 + && pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \ +# then we use "pip list" to ensure we don't have more than one pip version installed +# https://github.com/docker-library/python/pull/100 && [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ \ && find /usr/local -depth \ diff --git a/3.3/wheezy/Dockerfile b/3.3/wheezy/Dockerfile index ef0c41598..46980f537 100644 --- a/3.3/wheezy/Dockerfile +++ b/3.3/wheezy/Dockerfile @@ -56,7 +56,12 @@ RUN set -ex \ && python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \ && rm /tmp/get-pip.py \ ; fi \ - && pip3 install --no-cache-dir --upgrade "pip==$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 + && pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \ +# then we use "pip list" to ensure we don't have more than one pip version installed +# https://github.com/docker-library/python/pull/100 && [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ \ && find /usr/local -depth \ diff --git a/3.4/Dockerfile b/3.4/Dockerfile index c42717bf3..9fa0f7076 100644 --- a/3.4/Dockerfile +++ b/3.4/Dockerfile @@ -56,7 +56,12 @@ RUN set -ex \ && python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \ && rm /tmp/get-pip.py \ ; fi \ - && pip3 install --no-cache-dir --upgrade "pip==$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 + && pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \ +# then we use "pip list" to ensure we don't have more than one pip version installed +# https://github.com/docker-library/python/pull/100 && [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ \ && find /usr/local -depth \ diff --git a/3.4/alpine/Dockerfile b/3.4/alpine/Dockerfile index 19dc70c98..b6c90b564 100644 --- a/3.4/alpine/Dockerfile +++ b/3.4/alpine/Dockerfile @@ -73,7 +73,12 @@ RUN set -ex \ && python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \ && rm /tmp/get-pip.py \ ; fi \ - && pip3 install --no-cache-dir --upgrade "pip==$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 + && pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \ +# then we use "pip list" to ensure we don't have more than one pip version installed +# https://github.com/docker-library/python/pull/100 && [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ \ && find /usr/local -depth \ diff --git a/3.4/slim/Dockerfile b/3.4/slim/Dockerfile index 89699fd6f..4ef2a4d96 100644 --- a/3.4/slim/Dockerfile +++ b/3.4/slim/Dockerfile @@ -69,7 +69,12 @@ RUN set -ex \ && python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \ && rm /tmp/get-pip.py \ ; fi \ - && pip3 install --no-cache-dir --upgrade "pip==$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 + && pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \ +# then we use "pip list" to ensure we don't have more than one pip version installed +# https://github.com/docker-library/python/pull/100 && [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ \ && find /usr/local -depth \ diff --git a/3.4/wheezy/Dockerfile b/3.4/wheezy/Dockerfile index 72eb6bddf..73d1c235d 100644 --- a/3.4/wheezy/Dockerfile +++ b/3.4/wheezy/Dockerfile @@ -56,7 +56,12 @@ RUN set -ex \ && python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \ && rm /tmp/get-pip.py \ ; fi \ - && pip3 install --no-cache-dir --upgrade "pip==$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 + && pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \ +# then we use "pip list" to ensure we don't have more than one pip version installed +# https://github.com/docker-library/python/pull/100 && [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ \ && find /usr/local -depth \ diff --git a/3.5/Dockerfile b/3.5/Dockerfile index b9aa4ce0c..69d91321e 100644 --- a/3.5/Dockerfile +++ b/3.5/Dockerfile @@ -56,7 +56,12 @@ RUN set -ex \ && python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \ && rm /tmp/get-pip.py \ ; fi \ - && pip3 install --no-cache-dir --upgrade "pip==$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 + && pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \ +# then we use "pip list" to ensure we don't have more than one pip version installed +# https://github.com/docker-library/python/pull/100 && [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ \ && find /usr/local -depth \ diff --git a/3.5/alpine/Dockerfile b/3.5/alpine/Dockerfile index d368cbb8c..bc2c41f2b 100644 --- a/3.5/alpine/Dockerfile +++ b/3.5/alpine/Dockerfile @@ -73,7 +73,12 @@ RUN set -ex \ && python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \ && rm /tmp/get-pip.py \ ; fi \ - && pip3 install --no-cache-dir --upgrade "pip==$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 + && pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \ +# then we use "pip list" to ensure we don't have more than one pip version installed +# https://github.com/docker-library/python/pull/100 && [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ \ && find /usr/local -depth \ diff --git a/3.5/slim/Dockerfile b/3.5/slim/Dockerfile index d981a6a1e..111ff9711 100644 --- a/3.5/slim/Dockerfile +++ b/3.5/slim/Dockerfile @@ -69,7 +69,12 @@ RUN set -ex \ && python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \ && rm /tmp/get-pip.py \ ; fi \ - && pip3 install --no-cache-dir --upgrade "pip==$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 + && pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \ +# then we use "pip list" to ensure we don't have more than one pip version installed +# https://github.com/docker-library/python/pull/100 && [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ \ && find /usr/local -depth \ diff --git a/3.5/windows/windowsservercore/Dockerfile b/3.5/windows/windowsservercore/Dockerfile index 917dfb075..64c018734 100644 --- a/3.5/windows/windowsservercore/Dockerfile +++ b/3.5/windows/windowsservercore/Dockerfile @@ -42,7 +42,10 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env \ $pipInstall = ('pip=={0}' -f $env:PYTHON_PIP_VERSION); \ Write-Host ('Installing {0} ...' -f $pipInstall); \ - pip install --no-cache-dir --upgrade $pipInstall; \ +# 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; \ \ Write-Host 'Verifying pip install ...'; \ pip --version; \ diff --git a/3.6/Dockerfile b/3.6/Dockerfile index 4797fa686..5e703d27e 100644 --- a/3.6/Dockerfile +++ b/3.6/Dockerfile @@ -50,7 +50,12 @@ RUN set -ex \ && python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \ && rm /tmp/get-pip.py \ ; fi \ - && pip3 install --no-cache-dir --upgrade "pip==$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 + && pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \ +# then we use "pip list" to ensure we don't have more than one pip version installed +# https://github.com/docker-library/python/pull/100 && [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ \ && find /usr/local -depth \ diff --git a/3.6/alpine/Dockerfile b/3.6/alpine/Dockerfile index 7314fb7ce..4c014f49d 100644 --- a/3.6/alpine/Dockerfile +++ b/3.6/alpine/Dockerfile @@ -67,7 +67,12 @@ RUN set -ex \ && python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \ && rm /tmp/get-pip.py \ ; fi \ - && pip3 install --no-cache-dir --upgrade "pip==$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 + && pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \ +# then we use "pip list" to ensure we don't have more than one pip version installed +# https://github.com/docker-library/python/pull/100 && [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ \ && find /usr/local -depth \ diff --git a/3.6/slim/Dockerfile b/3.6/slim/Dockerfile index 067dd29e5..ab7ade544 100644 --- a/3.6/slim/Dockerfile +++ b/3.6/slim/Dockerfile @@ -63,7 +63,12 @@ RUN set -ex \ && python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \ && rm /tmp/get-pip.py \ ; fi \ - && pip3 install --no-cache-dir --upgrade "pip==$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 + && pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \ +# then we use "pip list" to ensure we don't have more than one pip version installed +# https://github.com/docker-library/python/pull/100 && [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ \ && find /usr/local -depth \ diff --git a/3.6/windows/windowsservercore/Dockerfile b/3.6/windows/windowsservercore/Dockerfile index 49b5104c0..b5fa44ea5 100644 --- a/3.6/windows/windowsservercore/Dockerfile +++ b/3.6/windows/windowsservercore/Dockerfile @@ -36,7 +36,10 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env \ $pipInstall = ('pip=={0}' -f $env:PYTHON_PIP_VERSION); \ Write-Host ('Installing {0} ...' -f $pipInstall); \ - pip install --no-cache-dir --upgrade $pipInstall; \ +# 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; \ \ Write-Host 'Verifying pip install ...'; \ pip --version; \ diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index 22a7bae0e..5a9a60e07 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -67,7 +67,12 @@ RUN set -ex \ && python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \ && rm /tmp/get-pip.py \ ; fi \ - && pip3 install --no-cache-dir --upgrade "pip==$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 + && pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \ +# then we use "pip list" to ensure we don't have more than one pip version installed +# https://github.com/docker-library/python/pull/100 && [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ \ && find /usr/local -depth \ diff --git a/Dockerfile-debian.template b/Dockerfile-debian.template index f9df74b38..56c6ef26d 100644 --- a/Dockerfile-debian.template +++ b/Dockerfile-debian.template @@ -50,7 +50,12 @@ RUN set -ex \ && python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \ && rm /tmp/get-pip.py \ ; fi \ - && pip3 install --no-cache-dir --upgrade "pip==$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 + && pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \ +# then we use "pip list" to ensure we don't have more than one pip version installed +# https://github.com/docker-library/python/pull/100 && [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ \ && find /usr/local -depth \ diff --git a/Dockerfile-slim.template b/Dockerfile-slim.template index c0ac7258c..1eb9bb10c 100644 --- a/Dockerfile-slim.template +++ b/Dockerfile-slim.template @@ -63,7 +63,12 @@ RUN set -ex \ && python3 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \ && rm /tmp/get-pip.py \ ; fi \ - && pip3 install --no-cache-dir --upgrade "pip==$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 + && pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \ +# then we use "pip list" to ensure we don't have more than one pip version installed +# https://github.com/docker-library/python/pull/100 && [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ \ && find /usr/local -depth \ diff --git a/Dockerfile-windowsservercore.template b/Dockerfile-windowsservercore.template index d74d0f9c7..01d1a8c36 100644 --- a/Dockerfile-windowsservercore.template +++ b/Dockerfile-windowsservercore.template @@ -36,7 +36,10 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f $env \ $pipInstall = ('pip=={0}' -f $env:PYTHON_PIP_VERSION); \ Write-Host ('Installing {0} ...' -f $pipInstall); \ - pip install --no-cache-dir --upgrade $pipInstall; \ +# 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; \ \ Write-Host 'Verifying pip install ...'; \ pip --version; \ From a70c6819aa38d938d56e96408aa6e7c3a9162c64 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 12 Sep 2016 20:12:09 -0700 Subject: [PATCH 15/29] Update to 3.6.0b1 --- 3.6/Dockerfile | 2 +- 3.6/alpine/Dockerfile | 2 +- 3.6/slim/Dockerfile | 2 +- 3.6/windows/windowsservercore/Dockerfile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/3.6/Dockerfile b/3.6/Dockerfile index 5e703d27e..b7760f771 100644 --- a/3.6/Dockerfile +++ b/3.6/Dockerfile @@ -14,7 +14,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.6.0a4 +ENV PYTHON_VERSION 3.6.0b1 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 8.1.2 diff --git a/3.6/alpine/Dockerfile b/3.6/alpine/Dockerfile index 4c014f49d..faa66a96b 100644 --- a/3.6/alpine/Dockerfile +++ b/3.6/alpine/Dockerfile @@ -12,7 +12,7 @@ ENV LANG C.UTF-8 RUN apk add --no-cache ca-certificates ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.6.0a4 +ENV PYTHON_VERSION 3.6.0b1 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 8.1.2 diff --git a/3.6/slim/Dockerfile b/3.6/slim/Dockerfile index ab7ade544..89f6f6d30 100644 --- a/3.6/slim/Dockerfile +++ b/3.6/slim/Dockerfile @@ -15,7 +15,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.6.0a4 +ENV PYTHON_VERSION 3.6.0b1 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 8.1.2 diff --git a/3.6/windows/windowsservercore/Dockerfile b/3.6/windows/windowsservercore/Dockerfile index b5fa44ea5..9fc019a1a 100644 --- a/3.6/windows/windowsservercore/Dockerfile +++ b/3.6/windows/windowsservercore/Dockerfile @@ -2,7 +2,7 @@ FROM microsoft/windowsservercore SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"] -ENV PYTHON_VERSION 3.6.0a4 +ENV PYTHON_VERSION 3.6.0b1 ENV PYTHON_RELEASE 3.6.0 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" From edde349541e11f66dcc79cde1674317d065ddbdd Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Wed, 21 Sep 2016 13:22:02 -0700 Subject: [PATCH 16/29] Update README with Jenkins badge change (see https://github.com/docker-library/docs/pull/697) --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b291ff81c..f2748854a 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,11 @@ The full readme is generated over in [docker-library/docs](https://github.com/do See a change merged here that doesn't show up on the Docker Hub yet? Check [the "library/python" manifest file in the docker-library/official-images repo](https://github.com/docker-library/official-images/blob/master/library/python), especially [PRs with the "library/python" label on that repo](https://github.com/docker-library/official-images/labels/library%2Fpython). For more information about the official images process, see the [docker-library/official-images readme](https://github.com/docker-library/official-images/blob/master/README.md). -[![Travis CI](https://img.shields.io/travis/docker-library/python/master.svg)](https://travis-ci.org/docker-library/python/branches) +--- + +- [Travis CI: + ![build status badge](https://img.shields.io/travis/docker-library/python/master.svg)](https://travis-ci.org/docker-library/python/branches) +- [Automated `update.sh`: + ![build status badge](https://doi-janky.infosiftr.net/job/update.sh/job/python/badge/icon)](https://doi-janky.infosiftr.net/job/update.sh/job/python) From cedfae972d45f8e7c0820aa1c7223c630e93fda5 Mon Sep 17 00:00:00 2001 From: Boris FELD Date: Wed, 5 Oct 2016 18:23:01 +0200 Subject: [PATCH 17/29] Use ubuntu14.04 as bases instead of debian jessie --- 2.7/Dockerfile | 2 +- 2.7/narrow/Dockerfile | 2 +- 3.4/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/2.7/Dockerfile b/2.7/Dockerfile index 67d4881c1..c8fd4b629 100644 --- a/2.7/Dockerfile +++ b/2.7/Dockerfile @@ -1,4 +1,4 @@ -FROM buildpack-deps:jessie +FROM quay.io/wantedly/buildpack-deps:14.04 # divert many traces of Debian Python (so that they are not used by mistake) # https://bugs.debian.org/33263 :( diff --git a/2.7/narrow/Dockerfile b/2.7/narrow/Dockerfile index 7e9a77f98..5d5219a43 100644 --- a/2.7/narrow/Dockerfile +++ b/2.7/narrow/Dockerfile @@ -1,4 +1,4 @@ -FROM buildpack-deps:jessie +FROM quay.io/wantedly/buildpack-deps:14.04 # divert many traces of Debian Python (so that they are not used by mistake) # https://bugs.debian.org/33263 :( diff --git a/3.4/Dockerfile b/3.4/Dockerfile index ccd10861c..d86b12a84 100644 --- a/3.4/Dockerfile +++ b/3.4/Dockerfile @@ -1,4 +1,4 @@ -FROM buildpack-deps:jessie +FROM quay.io/wantedly/buildpack-deps:14.04 # divert many traces of Debian Python (so that they are not used by mistake) # https://bugs.debian.org/33263 :( From a29d327288ff02b2f54be0d2b7340736e2329bdc Mon Sep 17 00:00:00 2001 From: Ilya Skriblovsky Date: Tue, 11 Oct 2016 09:28:15 +0300 Subject: [PATCH 18/29] Update to 3.6.0b2 --- 3.6/Dockerfile | 2 +- 3.6/alpine/Dockerfile | 2 +- 3.6/slim/Dockerfile | 2 +- 3.6/windows/windowsservercore/Dockerfile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/3.6/Dockerfile b/3.6/Dockerfile index b7760f771..bc0af85b7 100644 --- a/3.6/Dockerfile +++ b/3.6/Dockerfile @@ -14,7 +14,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.6.0b1 +ENV PYTHON_VERSION 3.6.0b2 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 8.1.2 diff --git a/3.6/alpine/Dockerfile b/3.6/alpine/Dockerfile index faa66a96b..99e37bca5 100644 --- a/3.6/alpine/Dockerfile +++ b/3.6/alpine/Dockerfile @@ -12,7 +12,7 @@ ENV LANG C.UTF-8 RUN apk add --no-cache ca-certificates ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.6.0b1 +ENV PYTHON_VERSION 3.6.0b2 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 8.1.2 diff --git a/3.6/slim/Dockerfile b/3.6/slim/Dockerfile index 89f6f6d30..faf52981e 100644 --- a/3.6/slim/Dockerfile +++ b/3.6/slim/Dockerfile @@ -15,7 +15,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.6.0b1 +ENV PYTHON_VERSION 3.6.0b2 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 8.1.2 diff --git a/3.6/windows/windowsservercore/Dockerfile b/3.6/windows/windowsservercore/Dockerfile index 9fc019a1a..771a30a82 100644 --- a/3.6/windows/windowsservercore/Dockerfile +++ b/3.6/windows/windowsservercore/Dockerfile @@ -2,7 +2,7 @@ FROM microsoft/windowsservercore SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"] -ENV PYTHON_VERSION 3.6.0b1 +ENV PYTHON_VERSION 3.6.0b2 ENV PYTHON_RELEASE 3.6.0 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" From 83b8e044aa38ab97b5427a9591e0537464e976e6 Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Tue, 25 Oct 2016 14:51:27 -0700 Subject: [PATCH 19/29] Add gdbm-dev to slim and alpine images --- 2.7/slim/Dockerfile | 1 + 3.3/alpine/Dockerfile | 1 + 3.3/slim/Dockerfile | 1 + 3.4/alpine/Dockerfile | 1 + 3.4/slim/Dockerfile | 1 + 3.5/alpine/Dockerfile | 1 + 3.5/slim/Dockerfile | 1 + 3.6/alpine/Dockerfile | 1 + 3.6/slim/Dockerfile | 1 + Dockerfile-alpine.template | 1 + Dockerfile-slim.template | 1 + 11 files changed, 11 insertions(+) diff --git a/2.7/slim/Dockerfile b/2.7/slim/Dockerfile index 6e656bc22..626bff3e8 100644 --- a/2.7/slim/Dockerfile +++ b/2.7/slim/Dockerfile @@ -26,6 +26,7 @@ RUN set -ex \ libbz2-dev \ libc6-dev \ libdb-dev \ + libgdbm-dev \ libncurses-dev \ libreadline-dev \ libsqlite3-dev \ diff --git a/3.3/alpine/Dockerfile b/3.3/alpine/Dockerfile index a4af10164..8ab1cb0f7 100644 --- a/3.3/alpine/Dockerfile +++ b/3.3/alpine/Dockerfile @@ -43,6 +43,7 @@ RUN set -ex \ && apk add --no-cache --virtual .build-deps \ bzip2-dev \ gcc \ + gdbm-dev \ libc-dev \ linux-headers \ make \ diff --git a/3.3/slim/Dockerfile b/3.3/slim/Dockerfile index 847fc3c85..73e910fb5 100644 --- a/3.3/slim/Dockerfile +++ b/3.3/slim/Dockerfile @@ -31,6 +31,7 @@ RUN set -ex \ gcc \ libbz2-dev \ libc6-dev \ + libgdbm-dev \ liblzma-dev \ libncurses-dev \ libreadline-dev \ diff --git a/3.4/alpine/Dockerfile b/3.4/alpine/Dockerfile index b6c90b564..1932be4a4 100644 --- a/3.4/alpine/Dockerfile +++ b/3.4/alpine/Dockerfile @@ -43,6 +43,7 @@ RUN set -ex \ && apk add --no-cache --virtual .build-deps \ bzip2-dev \ gcc \ + gdbm-dev \ libc-dev \ linux-headers \ make \ diff --git a/3.4/slim/Dockerfile b/3.4/slim/Dockerfile index 4ef2a4d96..ab5e7daf5 100644 --- a/3.4/slim/Dockerfile +++ b/3.4/slim/Dockerfile @@ -31,6 +31,7 @@ RUN set -ex \ gcc \ libbz2-dev \ libc6-dev \ + libgdbm-dev \ liblzma-dev \ libncurses-dev \ libreadline-dev \ diff --git a/3.5/alpine/Dockerfile b/3.5/alpine/Dockerfile index bc2c41f2b..5f3b56d33 100644 --- a/3.5/alpine/Dockerfile +++ b/3.5/alpine/Dockerfile @@ -43,6 +43,7 @@ RUN set -ex \ && apk add --no-cache --virtual .build-deps \ bzip2-dev \ gcc \ + gdbm-dev \ libc-dev \ linux-headers \ make \ diff --git a/3.5/slim/Dockerfile b/3.5/slim/Dockerfile index 111ff9711..a3065c8b2 100644 --- a/3.5/slim/Dockerfile +++ b/3.5/slim/Dockerfile @@ -31,6 +31,7 @@ RUN set -ex \ gcc \ libbz2-dev \ libc6-dev \ + libgdbm-dev \ liblzma-dev \ libncurses-dev \ libreadline-dev \ diff --git a/3.6/alpine/Dockerfile b/3.6/alpine/Dockerfile index 99e37bca5..1df353097 100644 --- a/3.6/alpine/Dockerfile +++ b/3.6/alpine/Dockerfile @@ -37,6 +37,7 @@ RUN set -ex \ && apk add --no-cache --virtual .build-deps \ bzip2-dev \ gcc \ + gdbm-dev \ libc-dev \ linux-headers \ make \ diff --git a/3.6/slim/Dockerfile b/3.6/slim/Dockerfile index faf52981e..8e7a9fb9c 100644 --- a/3.6/slim/Dockerfile +++ b/3.6/slim/Dockerfile @@ -25,6 +25,7 @@ RUN set -ex \ gcc \ libbz2-dev \ libc6-dev \ + libgdbm-dev \ liblzma-dev \ libncurses-dev \ libreadline-dev \ diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index 5a9a60e07..79e1cd2e5 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -37,6 +37,7 @@ RUN set -ex \ && apk add --no-cache --virtual .build-deps \ bzip2-dev \ gcc \ + gdbm-dev \ libc-dev \ linux-headers \ make \ diff --git a/Dockerfile-slim.template b/Dockerfile-slim.template index 1eb9bb10c..1c33e6395 100644 --- a/Dockerfile-slim.template +++ b/Dockerfile-slim.template @@ -25,6 +25,7 @@ RUN set -ex \ gcc \ libbz2-dev \ libc6-dev \ + libgdbm-dev \ liblzma-dev \ libncurses-dev \ libreadline-dev \ From 6b24d8cd0ad4c5a01874d094d92cd79518b3d490 Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Tue, 25 Oct 2016 16:27:50 -0700 Subject: [PATCH 20/29] Also, keep gdbm around --- 2.7/slim/Dockerfile | 1 + 3.3/slim/Dockerfile | 1 + 3.4/slim/Dockerfile | 1 + 3.5/slim/Dockerfile | 1 + 3.6/slim/Dockerfile | 1 + Dockerfile-slim.template | 1 + 6 files changed, 6 insertions(+) diff --git a/2.7/slim/Dockerfile b/2.7/slim/Dockerfile index 626bff3e8..097a6b8cc 100644 --- a/2.7/slim/Dockerfile +++ b/2.7/slim/Dockerfile @@ -10,6 +10,7 @@ ENV LANG C.UTF-8 # runtime dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates \ + libgdbm3 \ libsqlite3-0 \ libssl1.0.0 \ && rm -rf /var/lib/apt/lists/* diff --git a/3.3/slim/Dockerfile b/3.3/slim/Dockerfile index 73e910fb5..09028a4f6 100644 --- a/3.3/slim/Dockerfile +++ b/3.3/slim/Dockerfile @@ -16,6 +16,7 @@ ENV LANG C.UTF-8 # runtime dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates \ + libgdbm3 \ libsqlite3-0 \ libssl1.0.0 \ && rm -rf /var/lib/apt/lists/* diff --git a/3.4/slim/Dockerfile b/3.4/slim/Dockerfile index ab5e7daf5..4b9c5013c 100644 --- a/3.4/slim/Dockerfile +++ b/3.4/slim/Dockerfile @@ -16,6 +16,7 @@ ENV LANG C.UTF-8 # runtime dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates \ + libgdbm3 \ libsqlite3-0 \ libssl1.0.0 \ && rm -rf /var/lib/apt/lists/* diff --git a/3.5/slim/Dockerfile b/3.5/slim/Dockerfile index a3065c8b2..4fc019c5e 100644 --- a/3.5/slim/Dockerfile +++ b/3.5/slim/Dockerfile @@ -16,6 +16,7 @@ ENV LANG C.UTF-8 # runtime dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates \ + libgdbm3 \ libsqlite3-0 \ libssl1.0.0 \ && rm -rf /var/lib/apt/lists/* diff --git a/3.6/slim/Dockerfile b/3.6/slim/Dockerfile index 8e7a9fb9c..842390d0d 100644 --- a/3.6/slim/Dockerfile +++ b/3.6/slim/Dockerfile @@ -10,6 +10,7 @@ ENV LANG C.UTF-8 # runtime dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates \ + libgdbm3 \ libsqlite3-0 \ libssl1.0.0 \ && rm -rf /var/lib/apt/lists/* diff --git a/Dockerfile-slim.template b/Dockerfile-slim.template index 1c33e6395..6c64ab5a6 100644 --- a/Dockerfile-slim.template +++ b/Dockerfile-slim.template @@ -10,6 +10,7 @@ ENV LANG C.UTF-8 # runtime dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates \ + libgdbm3 \ libsqlite3-0 \ libssl1.0.0 \ && rm -rf /var/lib/apt/lists/* From b16ff405101a9f6c6540fb3467ca25baa9610174 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 8 Nov 2016 16:26:41 -0800 Subject: [PATCH 21/29] Update 3.6 to 3.6.0b3 and refactor update.sh to handle pre-releases in a saner manner --- .travis.yml | 6 ++--- {3.6 => 3.6-rc}/Dockerfile | 8 +++++- {3.6 => 3.6-rc}/alpine/Dockerfile | 8 +++++- {3.6 => 3.6-rc}/onbuild/Dockerfile | 8 +++++- {3.6 => 3.6-rc}/slim/Dockerfile | 8 +++++- .../windows/windowsservercore/Dockerfile | 8 +++++- generate-stackbrew-library.sh | 1 + update.sh | 25 ++++++++++++++----- 8 files changed, 58 insertions(+), 14 deletions(-) rename {3.6 => 3.6-rc}/Dockerfile (96%) rename {3.6 => 3.6-rc}/alpine/Dockerfile (96%) rename {3.6 => 3.6-rc}/onbuild/Dockerfile (61%) rename {3.6 => 3.6-rc}/slim/Dockerfile (96%) rename {3.6 => 3.6-rc}/windows/windowsservercore/Dockerfile (93%) diff --git a/.travis.yml b/.travis.yml index 24b2e11b1..ded932948 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,9 +2,9 @@ language: bash services: docker env: - - VERSION=3.6 VARIANT= - - VERSION=3.6 VARIANT=slim - - VERSION=3.6 VARIANT=alpine + - VERSION=3.6-rc VARIANT= + - VERSION=3.6-rc VARIANT=slim + - VERSION=3.6-rc VARIANT=alpine - VERSION=3.5 VARIANT= - VERSION=3.5 VARIANT=slim - VERSION=3.5 VARIANT=alpine diff --git a/3.6/Dockerfile b/3.6-rc/Dockerfile similarity index 96% rename from 3.6/Dockerfile rename to 3.6-rc/Dockerfile index bc0af85b7..8240328c5 100644 --- a/3.6/Dockerfile +++ b/3.6-rc/Dockerfile @@ -1,3 +1,9 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + FROM buildpack-deps:jessie # ensure local python is preferred over distribution python @@ -14,7 +20,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.6.0b2 +ENV PYTHON_VERSION 3.6.0b3 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 8.1.2 diff --git a/3.6/alpine/Dockerfile b/3.6-rc/alpine/Dockerfile similarity index 96% rename from 3.6/alpine/Dockerfile rename to 3.6-rc/alpine/Dockerfile index 1df353097..e183f8672 100644 --- a/3.6/alpine/Dockerfile +++ b/3.6-rc/alpine/Dockerfile @@ -1,3 +1,9 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + FROM alpine:3.4 # ensure local python is preferred over distribution python @@ -12,7 +18,7 @@ ENV LANG C.UTF-8 RUN apk add --no-cache ca-certificates ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.6.0b2 +ENV PYTHON_VERSION 3.6.0b3 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 8.1.2 diff --git a/3.6/onbuild/Dockerfile b/3.6-rc/onbuild/Dockerfile similarity index 61% rename from 3.6/onbuild/Dockerfile rename to 3.6-rc/onbuild/Dockerfile index 865aaa84c..0cf02adb3 100644 --- a/3.6/onbuild/Dockerfile +++ b/3.6-rc/onbuild/Dockerfile @@ -1,4 +1,10 @@ -FROM python:3.6 +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + +FROM python:3.6-rc RUN mkdir -p /usr/src/app WORKDIR /usr/src/app diff --git a/3.6/slim/Dockerfile b/3.6-rc/slim/Dockerfile similarity index 96% rename from 3.6/slim/Dockerfile rename to 3.6-rc/slim/Dockerfile index 842390d0d..fcc4988ef 100644 --- a/3.6/slim/Dockerfile +++ b/3.6-rc/slim/Dockerfile @@ -1,3 +1,9 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + FROM debian:jessie # ensure local python is preferred over distribution python @@ -16,7 +22,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.6.0b2 +ENV PYTHON_VERSION 3.6.0b3 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 8.1.2 diff --git a/3.6/windows/windowsservercore/Dockerfile b/3.6-rc/windows/windowsservercore/Dockerfile similarity index 93% rename from 3.6/windows/windowsservercore/Dockerfile rename to 3.6-rc/windows/windowsservercore/Dockerfile index 771a30a82..fb03d2033 100644 --- a/3.6/windows/windowsservercore/Dockerfile +++ b/3.6-rc/windows/windowsservercore/Dockerfile @@ -1,8 +1,14 @@ +# +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# + FROM microsoft/windowsservercore SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"] -ENV PYTHON_VERSION 3.6.0b2 +ENV PYTHON_VERSION 3.6.0b3 ENV PYTHON_RELEASE 3.6.0 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 92bf0e3b9..43bf4a539 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -2,6 +2,7 @@ set -eu declare -A aliases=( + [3.6-rc]='rc' [3.5]='3 latest' [2.7]='2' ) diff --git a/update.sh b/update.sh index fae90ae29..49d9a9fe8 100755 --- a/update.sh +++ b/update.sh @@ -47,18 +47,31 @@ generated_warning() { travisEnv= for version in "${versions[@]}"; do - # Python 2.7.8 - # Python 3.4.1 - fullVersion="$(curl -fsSL 'https://www.python.org/downloads/' | awk -F 'Python |' '/]+>Python '"$version"'./ { print $2 }' | grep -v 'rc' | sort -V | tail -1)" - # TODO figure out a better way to handle RCs than just filtering them out + rcGrepV='-v' + rcVersion="${version%-rc}" + if [ "$rcVersion" != "$version" ]; then + rcGrepV= + fi + + possibles=( $(curl -fsSL 'https://www.python.org/ftp/python/' | grep '&2 + exit 1 else if [[ "$version" != 2.* ]]; then for variant in \ @@ -86,7 +99,7 @@ for version in "${versions[@]}"; do ( set -x sed -ri \ - -e 's/^(ENV GPG_KEY) .*/\1 '"${gpgKeys[$version]}"'/' \ + -e 's/^(ENV GPG_KEY) .*/\1 '"${gpgKeys[$rcVersion]}"'/' \ -e 's/^(ENV PYTHON_VERSION) .*/\1 '"$fullVersion"'/' \ -e 's/^(ENV PYTHON_RELEASE) .*/\1 '"${fullVersion%%[a-z]*}"'/' \ -e 's/^(ENV PYTHON_PIP_VERSION) .*/\1 '"$pipVersion"'/' \ From 693a75332e8ae5ad3bfae6e8399c4d7cc3cb6181 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20K=C3=A4ufl?= Date: Fri, 4 Nov 2016 15:09:25 +0100 Subject: [PATCH 22/29] Upgraded to pip 9.0.1 --- 2.7/Dockerfile | 2 +- 2.7/alpine/Dockerfile | 2 +- 2.7/slim/Dockerfile | 2 +- 2.7/wheezy/Dockerfile | 2 +- 2.7/windows/windowsservercore/Dockerfile | 2 +- 3.3/Dockerfile | 2 +- 3.3/alpine/Dockerfile | 2 +- 3.3/slim/Dockerfile | 2 +- 3.3/wheezy/Dockerfile | 2 +- 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 +- 3.5/windows/windowsservercore/Dockerfile | 2 +- 3.6-rc/Dockerfile | 2 +- 3.6-rc/alpine/Dockerfile | 2 +- 3.6-rc/slim/Dockerfile | 2 +- 3.6-rc/windows/windowsservercore/Dockerfile | 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) diff --git a/2.7/Dockerfile b/2.7/Dockerfile index e56901f64..5ce2e1cad 100644 --- a/2.7/Dockerfile +++ b/2.7/Dockerfile @@ -17,7 +17,7 @@ ENV GPG_KEY C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF ENV PYTHON_VERSION 2.7.12 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 8.1.2 +ENV PYTHON_PIP_VERSION 9.0.1 RUN set -ex \ && buildDeps=' \ diff --git a/2.7/alpine/Dockerfile b/2.7/alpine/Dockerfile index 2c53d0cb1..c34cd2cf4 100644 --- a/2.7/alpine/Dockerfile +++ b/2.7/alpine/Dockerfile @@ -15,7 +15,7 @@ ENV GPG_KEY C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF ENV PYTHON_VERSION 2.7.12 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 8.1.2 +ENV PYTHON_PIP_VERSION 9.0.1 RUN set -ex \ && apk add --no-cache --virtual .fetch-deps \ diff --git a/2.7/slim/Dockerfile b/2.7/slim/Dockerfile index 097a6b8cc..39a9970ef 100644 --- a/2.7/slim/Dockerfile +++ b/2.7/slim/Dockerfile @@ -19,7 +19,7 @@ ENV GPG_KEY C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF ENV PYTHON_VERSION 2.7.12 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 8.1.2 +ENV PYTHON_PIP_VERSION 9.0.1 RUN set -ex \ && buildDeps=' \ diff --git a/2.7/wheezy/Dockerfile b/2.7/wheezy/Dockerfile index 6c3b68436..986413a6a 100644 --- a/2.7/wheezy/Dockerfile +++ b/2.7/wheezy/Dockerfile @@ -17,7 +17,7 @@ ENV GPG_KEY C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF ENV PYTHON_VERSION 2.7.12 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 8.1.2 +ENV PYTHON_PIP_VERSION 9.0.1 RUN set -ex \ && buildDeps=' \ diff --git a/2.7/windows/windowsservercore/Dockerfile b/2.7/windows/windowsservercore/Dockerfile index 901c8137a..2ba76e977 100644 --- a/2.7/windows/windowsservercore/Dockerfile +++ b/2.7/windows/windowsservercore/Dockerfile @@ -6,7 +6,7 @@ ENV PYTHON_VERSION 2.7.12 ENV PYTHON_RELEASE 2.7.12 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 8.1.2 +ENV PYTHON_PIP_VERSION 9.0.1 RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}.amd64.msi' -f $env:PYTHON_RELEASE, $env:PYTHON_VERSION); \ Write-Host ('Downloading {0} ...' -f $url); \ diff --git a/3.3/Dockerfile b/3.3/Dockerfile index ee3062605..0c171389f 100644 --- a/3.3/Dockerfile +++ b/3.3/Dockerfile @@ -23,7 +23,7 @@ ENV GPG_KEY 26DEA9D4613391EF3E25C9FF0A5B101836580288 ENV PYTHON_VERSION 3.3.6 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 8.1.2 +ENV PYTHON_PIP_VERSION 9.0.1 RUN set -ex \ && buildDeps=' \ diff --git a/3.3/alpine/Dockerfile b/3.3/alpine/Dockerfile index 8ab1cb0f7..042ae7ce4 100644 --- a/3.3/alpine/Dockerfile +++ b/3.3/alpine/Dockerfile @@ -21,7 +21,7 @@ ENV GPG_KEY 26DEA9D4613391EF3E25C9FF0A5B101836580288 ENV PYTHON_VERSION 3.3.6 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 8.1.2 +ENV PYTHON_PIP_VERSION 9.0.1 RUN set -ex \ && apk add --no-cache --virtual .fetch-deps \ diff --git a/3.3/slim/Dockerfile b/3.3/slim/Dockerfile index 09028a4f6..648b8abbe 100644 --- a/3.3/slim/Dockerfile +++ b/3.3/slim/Dockerfile @@ -25,7 +25,7 @@ ENV GPG_KEY 26DEA9D4613391EF3E25C9FF0A5B101836580288 ENV PYTHON_VERSION 3.3.6 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 8.1.2 +ENV PYTHON_PIP_VERSION 9.0.1 RUN set -ex \ && buildDeps=' \ diff --git a/3.3/wheezy/Dockerfile b/3.3/wheezy/Dockerfile index 46980f537..580513e7d 100644 --- a/3.3/wheezy/Dockerfile +++ b/3.3/wheezy/Dockerfile @@ -23,7 +23,7 @@ ENV GPG_KEY 26DEA9D4613391EF3E25C9FF0A5B101836580288 ENV PYTHON_VERSION 3.3.6 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 8.1.2 +ENV PYTHON_PIP_VERSION 9.0.1 RUN set -ex \ && buildDeps=' \ diff --git a/3.4/Dockerfile b/3.4/Dockerfile index 9fa0f7076..d9e82ce64 100644 --- a/3.4/Dockerfile +++ b/3.4/Dockerfile @@ -23,7 +23,7 @@ ENV GPG_KEY 97FC712E4C024BBEA48A61ED3A5CA953F73C700D ENV PYTHON_VERSION 3.4.5 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 8.1.2 +ENV PYTHON_PIP_VERSION 9.0.1 RUN set -ex \ && buildDeps=' \ diff --git a/3.4/alpine/Dockerfile b/3.4/alpine/Dockerfile index 1932be4a4..4f6629ef7 100644 --- a/3.4/alpine/Dockerfile +++ b/3.4/alpine/Dockerfile @@ -21,7 +21,7 @@ ENV GPG_KEY 97FC712E4C024BBEA48A61ED3A5CA953F73C700D ENV PYTHON_VERSION 3.4.5 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 8.1.2 +ENV PYTHON_PIP_VERSION 9.0.1 RUN set -ex \ && apk add --no-cache --virtual .fetch-deps \ diff --git a/3.4/slim/Dockerfile b/3.4/slim/Dockerfile index 4b9c5013c..d08ff9833 100644 --- a/3.4/slim/Dockerfile +++ b/3.4/slim/Dockerfile @@ -25,7 +25,7 @@ ENV GPG_KEY 97FC712E4C024BBEA48A61ED3A5CA953F73C700D ENV PYTHON_VERSION 3.4.5 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 8.1.2 +ENV PYTHON_PIP_VERSION 9.0.1 RUN set -ex \ && buildDeps=' \ diff --git a/3.4/wheezy/Dockerfile b/3.4/wheezy/Dockerfile index 73d1c235d..6aeb45f38 100644 --- a/3.4/wheezy/Dockerfile +++ b/3.4/wheezy/Dockerfile @@ -23,7 +23,7 @@ ENV GPG_KEY 97FC712E4C024BBEA48A61ED3A5CA953F73C700D ENV PYTHON_VERSION 3.4.5 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 8.1.2 +ENV PYTHON_PIP_VERSION 9.0.1 RUN set -ex \ && buildDeps=' \ diff --git a/3.5/Dockerfile b/3.5/Dockerfile index 69d91321e..214537104 100644 --- a/3.5/Dockerfile +++ b/3.5/Dockerfile @@ -23,7 +23,7 @@ ENV GPG_KEY 97FC712E4C024BBEA48A61ED3A5CA953F73C700D ENV PYTHON_VERSION 3.5.2 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 8.1.2 +ENV PYTHON_PIP_VERSION 9.0.1 RUN set -ex \ && buildDeps=' \ diff --git a/3.5/alpine/Dockerfile b/3.5/alpine/Dockerfile index 5f3b56d33..d71bbf9f2 100644 --- a/3.5/alpine/Dockerfile +++ b/3.5/alpine/Dockerfile @@ -21,7 +21,7 @@ ENV GPG_KEY 97FC712E4C024BBEA48A61ED3A5CA953F73C700D ENV PYTHON_VERSION 3.5.2 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 8.1.2 +ENV PYTHON_PIP_VERSION 9.0.1 RUN set -ex \ && apk add --no-cache --virtual .fetch-deps \ diff --git a/3.5/slim/Dockerfile b/3.5/slim/Dockerfile index 4fc019c5e..328bd9f53 100644 --- a/3.5/slim/Dockerfile +++ b/3.5/slim/Dockerfile @@ -25,7 +25,7 @@ ENV GPG_KEY 97FC712E4C024BBEA48A61ED3A5CA953F73C700D ENV PYTHON_VERSION 3.5.2 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 8.1.2 +ENV PYTHON_PIP_VERSION 9.0.1 RUN set -ex \ && buildDeps=' \ diff --git a/3.5/windows/windowsservercore/Dockerfile b/3.5/windows/windowsservercore/Dockerfile index 64c018734..b218d0f3b 100644 --- a/3.5/windows/windowsservercore/Dockerfile +++ b/3.5/windows/windowsservercore/Dockerfile @@ -12,7 +12,7 @@ ENV PYTHON_VERSION 3.5.2 ENV PYTHON_RELEASE 3.5.2 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 8.1.2 +ENV PYTHON_PIP_VERSION 9.0.1 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); \ diff --git a/3.6-rc/Dockerfile b/3.6-rc/Dockerfile index 8240328c5..eb585df99 100644 --- a/3.6-rc/Dockerfile +++ b/3.6-rc/Dockerfile @@ -23,7 +23,7 @@ ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D ENV PYTHON_VERSION 3.6.0b3 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 8.1.2 +ENV PYTHON_PIP_VERSION 9.0.1 RUN set -ex \ && buildDeps=' \ diff --git a/3.6-rc/alpine/Dockerfile b/3.6-rc/alpine/Dockerfile index e183f8672..b6b8a465b 100644 --- a/3.6-rc/alpine/Dockerfile +++ b/3.6-rc/alpine/Dockerfile @@ -21,7 +21,7 @@ ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D ENV PYTHON_VERSION 3.6.0b3 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 8.1.2 +ENV PYTHON_PIP_VERSION 9.0.1 RUN set -ex \ && apk add --no-cache --virtual .fetch-deps \ diff --git a/3.6-rc/slim/Dockerfile b/3.6-rc/slim/Dockerfile index fcc4988ef..1a3beb255 100644 --- a/3.6-rc/slim/Dockerfile +++ b/3.6-rc/slim/Dockerfile @@ -25,7 +25,7 @@ ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D ENV PYTHON_VERSION 3.6.0b3 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 8.1.2 +ENV PYTHON_PIP_VERSION 9.0.1 RUN set -ex \ && buildDeps=' \ diff --git a/3.6-rc/windows/windowsservercore/Dockerfile b/3.6-rc/windows/windowsservercore/Dockerfile index fb03d2033..0b4db2f52 100644 --- a/3.6-rc/windows/windowsservercore/Dockerfile +++ b/3.6-rc/windows/windowsservercore/Dockerfile @@ -12,7 +12,7 @@ ENV PYTHON_VERSION 3.6.0b3 ENV PYTHON_RELEASE 3.6.0 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 8.1.2 +ENV PYTHON_PIP_VERSION 9.0.1 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); \ From d8aac61bc3abddfd7ba58724446cf9b0e949ffa4 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Tue, 22 Nov 2016 02:49:16 -0800 Subject: [PATCH 23/29] Update to 3.6.0b4, pip 9.0.1 --- 3.6-rc/Dockerfile | 2 +- 3.6-rc/alpine/Dockerfile | 2 +- 3.6-rc/slim/Dockerfile | 2 +- 3.6-rc/windows/windowsservercore/Dockerfile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/3.6-rc/Dockerfile b/3.6-rc/Dockerfile index eb585df99..5d374290a 100644 --- a/3.6-rc/Dockerfile +++ b/3.6-rc/Dockerfile @@ -20,7 +20,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.6.0b3 +ENV PYTHON_VERSION 3.6.0b4 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 9.0.1 diff --git a/3.6-rc/alpine/Dockerfile b/3.6-rc/alpine/Dockerfile index b6b8a465b..1d5a91002 100644 --- a/3.6-rc/alpine/Dockerfile +++ b/3.6-rc/alpine/Dockerfile @@ -18,7 +18,7 @@ ENV LANG C.UTF-8 RUN apk add --no-cache ca-certificates ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.6.0b3 +ENV PYTHON_VERSION 3.6.0b4 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 9.0.1 diff --git a/3.6-rc/slim/Dockerfile b/3.6-rc/slim/Dockerfile index 1a3beb255..626d5d7fb 100644 --- a/3.6-rc/slim/Dockerfile +++ b/3.6-rc/slim/Dockerfile @@ -22,7 +22,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.6.0b3 +ENV PYTHON_VERSION 3.6.0b4 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 9.0.1 diff --git a/3.6-rc/windows/windowsservercore/Dockerfile b/3.6-rc/windows/windowsservercore/Dockerfile index 0b4db2f52..503dcf169 100644 --- a/3.6-rc/windows/windowsservercore/Dockerfile +++ b/3.6-rc/windows/windowsservercore/Dockerfile @@ -8,7 +8,7 @@ FROM microsoft/windowsservercore SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"] -ENV PYTHON_VERSION 3.6.0b3 +ENV PYTHON_VERSION 3.6.0b4 ENV PYTHON_RELEASE 3.6.0 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" From 12bf960914ceaec59562cf49cf048b971e54399a Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Wed, 7 Dec 2016 02:49:22 -0800 Subject: [PATCH 24/29] Update to 3.6.0rc1, pip 9.0.1 --- 3.6-rc/Dockerfile | 2 +- 3.6-rc/alpine/Dockerfile | 2 +- 3.6-rc/slim/Dockerfile | 2 +- 3.6-rc/windows/windowsservercore/Dockerfile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/3.6-rc/Dockerfile b/3.6-rc/Dockerfile index 5d374290a..2c670b6a8 100644 --- a/3.6-rc/Dockerfile +++ b/3.6-rc/Dockerfile @@ -20,7 +20,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.6.0b4 +ENV PYTHON_VERSION 3.6.0rc1 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 9.0.1 diff --git a/3.6-rc/alpine/Dockerfile b/3.6-rc/alpine/Dockerfile index 1d5a91002..9bc4a6724 100644 --- a/3.6-rc/alpine/Dockerfile +++ b/3.6-rc/alpine/Dockerfile @@ -18,7 +18,7 @@ ENV LANG C.UTF-8 RUN apk add --no-cache ca-certificates ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.6.0b4 +ENV PYTHON_VERSION 3.6.0rc1 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 9.0.1 diff --git a/3.6-rc/slim/Dockerfile b/3.6-rc/slim/Dockerfile index 626d5d7fb..3ec19083e 100644 --- a/3.6-rc/slim/Dockerfile +++ b/3.6-rc/slim/Dockerfile @@ -22,7 +22,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.6.0b4 +ENV PYTHON_VERSION 3.6.0rc1 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 9.0.1 diff --git a/3.6-rc/windows/windowsservercore/Dockerfile b/3.6-rc/windows/windowsservercore/Dockerfile index 503dcf169..3c9e6126b 100644 --- a/3.6-rc/windows/windowsservercore/Dockerfile +++ b/3.6-rc/windows/windowsservercore/Dockerfile @@ -8,7 +8,7 @@ FROM microsoft/windowsservercore SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"] -ENV PYTHON_VERSION 3.6.0b4 +ENV PYTHON_VERSION 3.6.0rc1 ENV PYTHON_RELEASE 3.6.0 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" From 26ac1ac8c63ddd479c869845c16261c527fe9945 Mon Sep 17 00:00:00 2001 From: Docker Library Bot Date: Fri, 16 Dec 2016 20:49:20 -0800 Subject: [PATCH 25/29] Update to 3.6.0rc2, pip 9.0.1 --- 3.6-rc/Dockerfile | 2 +- 3.6-rc/alpine/Dockerfile | 2 +- 3.6-rc/slim/Dockerfile | 2 +- 3.6-rc/windows/windowsservercore/Dockerfile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/3.6-rc/Dockerfile b/3.6-rc/Dockerfile index 2c670b6a8..c7361118f 100644 --- a/3.6-rc/Dockerfile +++ b/3.6-rc/Dockerfile @@ -20,7 +20,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.6.0rc1 +ENV PYTHON_VERSION 3.6.0rc2 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 9.0.1 diff --git a/3.6-rc/alpine/Dockerfile b/3.6-rc/alpine/Dockerfile index 9bc4a6724..1f623374c 100644 --- a/3.6-rc/alpine/Dockerfile +++ b/3.6-rc/alpine/Dockerfile @@ -18,7 +18,7 @@ ENV LANG C.UTF-8 RUN apk add --no-cache ca-certificates ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.6.0rc1 +ENV PYTHON_VERSION 3.6.0rc2 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 9.0.1 diff --git a/3.6-rc/slim/Dockerfile b/3.6-rc/slim/Dockerfile index 3ec19083e..1ed4c46c5 100644 --- a/3.6-rc/slim/Dockerfile +++ b/3.6-rc/slim/Dockerfile @@ -22,7 +22,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.6.0rc1 +ENV PYTHON_VERSION 3.6.0rc2 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 9.0.1 diff --git a/3.6-rc/windows/windowsservercore/Dockerfile b/3.6-rc/windows/windowsservercore/Dockerfile index 3c9e6126b..29e4cad67 100644 --- a/3.6-rc/windows/windowsservercore/Dockerfile +++ b/3.6-rc/windows/windowsservercore/Dockerfile @@ -8,7 +8,7 @@ FROM microsoft/windowsservercore SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"] -ENV PYTHON_VERSION 3.6.0rc1 +ENV PYTHON_VERSION 3.6.0rc2 ENV PYTHON_RELEASE 3.6.0 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" From a248f4583c5f788e1af02016f762cdc323ee5765 Mon Sep 17 00:00:00 2001 From: Matt Robenolt Date: Mon, 19 Dec 2016 09:48:09 -0800 Subject: [PATCH 26/29] 2.7.13 --- 2.7/Dockerfile | 2 +- 2.7/alpine/Dockerfile | 2 +- 2.7/slim/Dockerfile | 2 +- 2.7/wheezy/Dockerfile | 2 +- 2.7/windows/windowsservercore/Dockerfile | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/2.7/Dockerfile b/2.7/Dockerfile index 5ce2e1cad..3c124783e 100644 --- a/2.7/Dockerfile +++ b/2.7/Dockerfile @@ -14,7 +14,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* ENV GPG_KEY C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF -ENV PYTHON_VERSION 2.7.12 +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 diff --git a/2.7/alpine/Dockerfile b/2.7/alpine/Dockerfile index c34cd2cf4..fe299aa02 100644 --- a/2.7/alpine/Dockerfile +++ b/2.7/alpine/Dockerfile @@ -12,7 +12,7 @@ ENV LANG C.UTF-8 RUN apk add --no-cache ca-certificates ENV GPG_KEY C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF -ENV PYTHON_VERSION 2.7.12 +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 diff --git a/2.7/slim/Dockerfile b/2.7/slim/Dockerfile index 39a9970ef..fa8a55d60 100644 --- a/2.7/slim/Dockerfile +++ b/2.7/slim/Dockerfile @@ -16,7 +16,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* ENV GPG_KEY C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF -ENV PYTHON_VERSION 2.7.12 +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 diff --git a/2.7/wheezy/Dockerfile b/2.7/wheezy/Dockerfile index 986413a6a..b14b748a0 100644 --- a/2.7/wheezy/Dockerfile +++ b/2.7/wheezy/Dockerfile @@ -14,7 +14,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* ENV GPG_KEY C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF -ENV PYTHON_VERSION 2.7.12 +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 diff --git a/2.7/windows/windowsservercore/Dockerfile b/2.7/windows/windowsservercore/Dockerfile index 2ba76e977..4d89c2379 100644 --- a/2.7/windows/windowsservercore/Dockerfile +++ b/2.7/windows/windowsservercore/Dockerfile @@ -2,8 +2,8 @@ FROM microsoft/windowsservercore SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"] -ENV PYTHON_VERSION 2.7.12 -ENV PYTHON_RELEASE 2.7.12 +ENV PYTHON_VERSION 2.7.13 +ENV PYTHON_RELEASE 2.7.13 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 9.0.1 From fc574035ad295e30747db59c05eaee2efcd2556a Mon Sep 17 00:00:00 2001 From: Boris FELD Date: Tue, 27 Dec 2016 10:41:53 +0100 Subject: [PATCH 27/29] Use the released 3.6 version instead of the rc2 --- 3.6-rc/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3.6-rc/Dockerfile b/3.6-rc/Dockerfile index c7361118f..0f65d6039 100644 --- a/3.6-rc/Dockerfile +++ b/3.6-rc/Dockerfile @@ -20,7 +20,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.6.0rc2 +ENV PYTHON_VERSION 3.6.0 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" ENV PYTHON_PIP_VERSION 9.0.1 From 0b6bd68d03f460222fd8cb04e012f68f47f2e080 Mon Sep 17 00:00:00 2001 From: Boris FELD Date: Tue, 27 Dec 2016 10:52:56 +0100 Subject: [PATCH 28/29] Update the narrow Dockerfile to match 2.7 --- 2.7/narrow/Dockerfile | 60 +++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 31 deletions(-) diff --git a/2.7/narrow/Dockerfile b/2.7/narrow/Dockerfile index 5d5219a43..7436b6e62 100644 --- a/2.7/narrow/Dockerfile +++ b/2.7/narrow/Dockerfile @@ -1,44 +1,33 @@ FROM quay.io/wantedly/buildpack-deps:14.04 -# divert many traces of Debian Python (so that they are not used by mistake) -# https://bugs.debian.org/33263 :( -RUN set -ex \ - && for bits in \ -# /etc/python* \ - /usr/bin/*2to3* \ - /usr/bin/*python* \ - /usr/bin/pdb* \ - /usr/bin/py* \ -# /usr/lib/python* \ -# /usr/share/python \ - ; do \ - dpkg-divert --rename "$bits"; \ - done +# ensure local python is preferred over distribution python +ENV PATH /usr/local/bin:$PATH # http://bugs.python.org/issue19846 # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. ENV LANG C.UTF-8 -# gpg: key 18ADD4FF: public key "Benjamin Peterson " imported -ENV GPG_KEY C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF +# runtime dependencies +RUN apt-get update && apt-get install -y --no-install-recommends \ + tcl \ + tk \ + && rm -rf /var/lib/apt/lists/* -ENV PYTHON_VERSION 2.7.12 +ENV GPG_KEY C01E1CAD5EA2C4F0B8E3571504C367C218ADD4FF +ENV PYTHON_VERSION 2.7.13 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 8.1.2 +ENV PYTHON_PIP_VERSION 9.0.1 RUN set -ex \ && buildDeps=' \ tcl-dev \ tk-dev \ ' \ - && runDeps=' \ - tcl \ - tk \ - ' \ - && apt-get update && apt-get install -y $runDeps $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ - && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \ - && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \ + && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ + \ + && wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" \ + && wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" \ && export GNUPGHOME="$(mktemp -d)" \ && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ && gpg --batch --verify python.tar.xz.asc python.tar.xz \ @@ -53,14 +42,23 @@ RUN set -ex \ && make -j$(nproc) \ && make install \ && 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" ] \ + \ + && wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \ + && python2 /tmp/get-pip.py "pip==$PYTHON_PIP_VERSION" \ + && rm /tmp/get-pip.py \ +# 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" \ +# then we use "pip list" to ensure we don't have more than one pip version installed +# https://github.com/docker-library/python/pull/100 + && [ "$(pip list |tac|tac| awk -F '[ ()]+' '$1 == "pip" { print $2; exit }')" = "$PYTHON_PIP_VERSION" ] \ + \ && find /usr/local -depth \ \( \ - \( -type d -a -name test -o -name tests \) \ - -o \ - \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \( -type d -a -name test -o -name tests \) \ + -o \ + \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ \) -exec rm -rf '{}' + \ && apt-get purge -y --auto-remove $buildDeps \ && rm -rf /usr/src/python ~/.cache From da373275c690c4ab375cd1a110904a6610b2b771 Mon Sep 17 00:00:00 2001 From: Boris FELD Date: Tue, 27 Dec 2016 11:09:31 +0100 Subject: [PATCH 29/29] Restore use of ubuntu 14.04 and add wget as a new build dependency --- 2.7/Dockerfile | 1 + 2.7/narrow/Dockerfile | 1 + 3.3/Dockerfile | 3 ++- 3.4/Dockerfile | 3 ++- 3.5/Dockerfile | 3 ++- 3.6-rc/Dockerfile | 3 ++- 6 files changed, 10 insertions(+), 4 deletions(-) diff --git a/2.7/Dockerfile b/2.7/Dockerfile index 455022fee..f39acf108 100644 --- a/2.7/Dockerfile +++ b/2.7/Dockerfile @@ -23,6 +23,7 @@ RUN set -ex \ && buildDeps=' \ tcl-dev \ tk-dev \ + wget \ ' \ && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ \ diff --git a/2.7/narrow/Dockerfile b/2.7/narrow/Dockerfile index 7436b6e62..e068e8a45 100644 --- a/2.7/narrow/Dockerfile +++ b/2.7/narrow/Dockerfile @@ -23,6 +23,7 @@ RUN set -ex \ && buildDeps=' \ tcl-dev \ tk-dev \ + wget \ ' \ && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ \ diff --git a/3.3/Dockerfile b/3.3/Dockerfile index 0c171389f..7ba4ef985 100644 --- a/3.3/Dockerfile +++ b/3.3/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM buildpack-deps:jessie +FROM quay.io/wantedly/buildpack-deps:14.04 # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH @@ -29,6 +29,7 @@ RUN set -ex \ && buildDeps=' \ tcl-dev \ tk-dev \ + wget \ ' \ && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ \ diff --git a/3.4/Dockerfile b/3.4/Dockerfile index cd458cf81..48b5caf7b 100644 --- a/3.4/Dockerfile +++ b/3.4/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM buildpack-deps:jessie +FROM quay.io/wantedly/buildpack-deps:14.04 # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH @@ -29,6 +29,7 @@ RUN set -ex \ && buildDeps=' \ tcl-dev \ tk-dev \ + wget \ ' \ && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ \ diff --git a/3.5/Dockerfile b/3.5/Dockerfile index e12da2f29..28c3d9f90 100644 --- a/3.5/Dockerfile +++ b/3.5/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM buildpack-deps:jessie +FROM quay.io/wantedly/buildpack-deps:14.04 # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH @@ -29,6 +29,7 @@ RUN set -ex \ && buildDeps=' \ tcl-dev \ tk-dev \ + wget \ ' \ && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ \ diff --git a/3.6-rc/Dockerfile b/3.6-rc/Dockerfile index 0f65d6039..50f0bf306 100644 --- a/3.6-rc/Dockerfile +++ b/3.6-rc/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM buildpack-deps:jessie +FROM quay.io/wantedly/buildpack-deps:14.04 # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH @@ -29,6 +29,7 @@ RUN set -ex \ && buildDeps=' \ tcl-dev \ tk-dev \ + wget \ ' \ && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ \