From 50fc273793dbbbc371c09b149a79af5ae4e279dd Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Fri, 5 Aug 2016 15:11:16 -0700 Subject: [PATCH 1/2] 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 2/2] 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