From 3232863ad5aba683fb084cb00097723c8c9efb47 Mon Sep 17 00:00:00 2001 From: Sukrit Khera Date: Mon, 25 Apr 2016 20:25:18 -0700 Subject: [PATCH] Fixes https://github.com/docker-library/python/pull/102 (tests folder removal) --- 2.7/Dockerfile | 10 ++++++---- 2.7/alpine/Dockerfile | 10 ++++++---- 2.7/slim/Dockerfile | 10 ++++++---- 2.7/wheezy/Dockerfile | 10 ++++++---- 3.3/Dockerfile | 10 ++++++---- 3.3/alpine/Dockerfile | 10 ++++++---- 3.3/slim/Dockerfile | 10 ++++++---- 3.3/wheezy/Dockerfile | 10 ++++++---- 3.4/Dockerfile | 10 ++++++---- 3.4/alpine/Dockerfile | 10 ++++++---- 3.4/slim/Dockerfile | 10 ++++++---- 3.4/wheezy/Dockerfile | 10 ++++++---- 3.5/Dockerfile | 10 ++++++---- 3.5/alpine/Dockerfile | 10 ++++++---- 3.5/slim/Dockerfile | 10 ++++++---- 15 files changed, 90 insertions(+), 60 deletions(-) diff --git a/2.7/Dockerfile b/2.7/Dockerfile index bfc0e69..be06cf7 100644 --- a/2.7/Dockerfile +++ b/2.7/Dockerfile @@ -33,10 +33,12 @@ RUN set -ex \ && ldconfig \ && curl -fSL 'https://bootstrap.pypa.io/get-pip.py' | python2 \ && pip install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \ - && find /usr/local \ - \( -type d -a -name test -o -name tests \) \ - -o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ - -exec rm -rf '{}' + \ + && find /usr/local -depth \ + \( \ + \( -type d -a -name test -o -name tests \) \ + -o \ + \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \) -exec rm -rf '{}' + \ && rm -rf /usr/src/python ~/.cache # install "virtualenv", since the vast majority of users of this image will want it diff --git a/2.7/alpine/Dockerfile b/2.7/alpine/Dockerfile index b18c27b..29b3c00 100644 --- a/2.7/alpine/Dockerfile +++ b/2.7/alpine/Dockerfile @@ -43,10 +43,12 @@ RUN set -ex \ && make install \ && curl -fSL 'https://bootstrap.pypa.io/get-pip.py' | python2 \ && pip install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \ - && find /usr/local \ - \( -type d -a -name test -o -name tests \) \ - -o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ - -exec rm -rf '{}' + \ + && 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 }' \ diff --git a/2.7/slim/Dockerfile b/2.7/slim/Dockerfile index e4fe648..fd17904 100644 --- a/2.7/slim/Dockerfile +++ b/2.7/slim/Dockerfile @@ -53,10 +53,12 @@ RUN set -ex \ && ldconfig \ && curl -fSL 'https://bootstrap.pypa.io/get-pip.py' | python2 \ && pip install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \ - && find /usr/local \ - \( -type d -a -name test -o -name tests \) \ - -o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ - -exec rm -rf '{}' + \ + && 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 diff --git a/2.7/wheezy/Dockerfile b/2.7/wheezy/Dockerfile index a69306d..d4333f1 100644 --- a/2.7/wheezy/Dockerfile +++ b/2.7/wheezy/Dockerfile @@ -33,10 +33,12 @@ RUN set -ex \ && ldconfig \ && curl -fSL 'https://bootstrap.pypa.io/get-pip.py' | python2 \ && pip install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \ - && find /usr/local \ - \( -type d -a -name test -o -name tests \) \ - -o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ - -exec rm -rf '{}' + \ + && find /usr/local -depth \ + \( \ + \( -type d -a -name test -o -name tests \) \ + -o \ + \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \) -exec rm -rf '{}' + \ && rm -rf /usr/src/python ~/.cache # install "virtualenv", since the vast majority of users of this image will want it diff --git a/3.3/Dockerfile b/3.3/Dockerfile index 13451a7..eb1565e 100644 --- a/3.3/Dockerfile +++ b/3.3/Dockerfile @@ -33,10 +33,12 @@ RUN set -ex \ && ldconfig \ && curl -fSL 'https://bootstrap.pypa.io/get-pip.py' | python3 \ && pip install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \ - && find /usr/local \ - \( -type d -a -name test -o -name tests \) \ - -o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ - -exec rm -rf '{}' + \ + && find /usr/local -depth \ + \( \ + \( -type d -a -name test -o -name tests \) \ + -o \ + \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \) -exec rm -rf '{}' + \ && rm -rf /usr/src/python ~/.cache # make some useful symlinks that are expected to exist diff --git a/3.3/alpine/Dockerfile b/3.3/alpine/Dockerfile index 33fe297..fad445c 100644 --- a/3.3/alpine/Dockerfile +++ b/3.3/alpine/Dockerfile @@ -44,10 +44,12 @@ RUN set -ex \ && make install \ && curl -fSL 'https://bootstrap.pypa.io/get-pip.py' | python3 \ && pip install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \ - && find /usr/local \ - \( -type d -a -name test -o -name tests \) \ - -o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ - -exec rm -rf '{}' + \ + && 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 }' \ diff --git a/3.3/slim/Dockerfile b/3.3/slim/Dockerfile index 4955143..61be7b3 100644 --- a/3.3/slim/Dockerfile +++ b/3.3/slim/Dockerfile @@ -54,10 +54,12 @@ RUN set -ex \ && ldconfig \ && curl -fSL 'https://bootstrap.pypa.io/get-pip.py' | python3 \ && pip install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \ - && find /usr/local \ - \( -type d -a -name test -o -name tests \) \ - -o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ - -exec rm -rf '{}' + \ + && 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 diff --git a/3.3/wheezy/Dockerfile b/3.3/wheezy/Dockerfile index 195d6a5..9ce43d0 100644 --- a/3.3/wheezy/Dockerfile +++ b/3.3/wheezy/Dockerfile @@ -33,10 +33,12 @@ RUN set -ex \ && ldconfig \ && curl -fSL 'https://bootstrap.pypa.io/get-pip.py' | python3 \ && pip install --no-cache-dir --upgrade pip==$PYTHON_PIP_VERSION \ - && find /usr/local \ - \( -type d -a -name test -o -name tests \) \ - -o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ - -exec rm -rf '{}' + \ + && find /usr/local -depth \ + \( \ + \( -type d -a -name test -o -name tests \) \ + -o \ + \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \) -exec rm -rf '{}' + \ && rm -rf /usr/src/python ~/.cache # make some useful symlinks that are expected to exist diff --git a/3.4/Dockerfile b/3.4/Dockerfile index 706c6f0..c3a5280 100644 --- a/3.4/Dockerfile +++ b/3.4/Dockerfile @@ -32,10 +32,12 @@ RUN set -ex \ && make install \ && ldconfig \ && pip3 install --no-cache-dir --upgrade --ignore-installed pip==$PYTHON_PIP_VERSION \ - && find /usr/local \ - \( -type d -a -name test -o -name tests \) \ - -o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ - -exec rm -rf '{}' + \ + && find /usr/local -depth \ + \( \ + \( -type d -a -name test -o -name tests \) \ + -o \ + \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \) -exec rm -rf '{}' + \ && rm -rf /usr/src/python ~/.cache # make some useful symlinks that are expected to exist diff --git a/3.4/alpine/Dockerfile b/3.4/alpine/Dockerfile index 1cc0430..9913091 100644 --- a/3.4/alpine/Dockerfile +++ b/3.4/alpine/Dockerfile @@ -44,10 +44,12 @@ RUN set -ex \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ && pip3 install --no-cache-dir --upgrade --ignore-installed pip==$PYTHON_PIP_VERSION \ - && find /usr/local \ - \( -type d -a -name test -o -name tests \) \ - -o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ - -exec rm -rf '{}' + \ + && 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 }' \ diff --git a/3.4/slim/Dockerfile b/3.4/slim/Dockerfile index 9f7e1a3..cde0768 100644 --- a/3.4/slim/Dockerfile +++ b/3.4/slim/Dockerfile @@ -53,10 +53,12 @@ RUN set -ex \ && make install \ && ldconfig \ && pip3 install --no-cache-dir --upgrade --ignore-installed pip==$PYTHON_PIP_VERSION \ - && find /usr/local \ - \( -type d -a -name test -o -name tests \) \ - -o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ - -exec rm -rf '{}' + \ + && 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 diff --git a/3.4/wheezy/Dockerfile b/3.4/wheezy/Dockerfile index f8d2e77..51ae88d 100644 --- a/3.4/wheezy/Dockerfile +++ b/3.4/wheezy/Dockerfile @@ -32,10 +32,12 @@ RUN set -ex \ && make install \ && ldconfig \ && pip3 install --no-cache-dir --upgrade --ignore-installed pip==$PYTHON_PIP_VERSION \ - && find /usr/local \ - \( -type d -a -name test -o -name tests \) \ - -o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ - -exec rm -rf '{}' + \ + && find /usr/local -depth \ + \( \ + \( -type d -a -name test -o -name tests \) \ + -o \ + \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \) -exec rm -rf '{}' + \ && rm -rf /usr/src/python ~/.cache # make some useful symlinks that are expected to exist diff --git a/3.5/Dockerfile b/3.5/Dockerfile index 33dd204..6a7c358 100644 --- a/3.5/Dockerfile +++ b/3.5/Dockerfile @@ -32,10 +32,12 @@ RUN set -ex \ && make install \ && ldconfig \ && pip3 install --no-cache-dir --upgrade --ignore-installed pip==$PYTHON_PIP_VERSION \ - && find /usr/local \ - \( -type d -a -name test -o -name tests \) \ - -o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ - -exec rm -rf '{}' + \ + && find /usr/local -depth \ + \( \ + \( -type d -a -name test -o -name tests \) \ + -o \ + \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ + \) -exec rm -rf '{}' + \ && rm -rf /usr/src/python ~/.cache # make some useful symlinks that are expected to exist diff --git a/3.5/alpine/Dockerfile b/3.5/alpine/Dockerfile index 23ea96a..25e7137 100644 --- a/3.5/alpine/Dockerfile +++ b/3.5/alpine/Dockerfile @@ -44,10 +44,12 @@ RUN set -ex \ && make -j$(getconf _NPROCESSORS_ONLN) \ && make install \ && pip3 install --no-cache-dir --upgrade --ignore-installed pip==$PYTHON_PIP_VERSION \ - && find /usr/local \ - \( -type d -a -name test -o -name tests \) \ - -o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ - -exec rm -rf '{}' + \ + && 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 }' \ diff --git a/3.5/slim/Dockerfile b/3.5/slim/Dockerfile index 8ad6db8..0593f22 100644 --- a/3.5/slim/Dockerfile +++ b/3.5/slim/Dockerfile @@ -53,10 +53,12 @@ RUN set -ex \ && make install \ && ldconfig \ && pip3 install --no-cache-dir --upgrade --ignore-installed pip==$PYTHON_PIP_VERSION \ - && find /usr/local \ - \( -type d -a -name test -o -name tests \) \ - -o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ - -exec rm -rf '{}' + \ + && 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