diff --git a/2.7/Dockerfile b/2.7/Dockerfile index 7d1e72cc3..9b1ffaa96 100644 --- a/2.7/Dockerfile +++ b/2.7/Dockerfile @@ -1,7 +1,19 @@ FROM buildpack-deps:jessie -# remove several traces of debian python -RUN apt-get purge -y python.* +# 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. diff --git a/2.7/slim/Dockerfile b/2.7/slim/Dockerfile index 244cd20e1..7a72af34c 100644 --- a/2.7/slim/Dockerfile +++ b/2.7/slim/Dockerfile @@ -1,8 +1,5 @@ FROM debian:jessie -# remove several traces of debian python -RUN apt-get purge -y python.* - # 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 9dcb89283..9731b10b1 100644 --- a/2.7/wheezy/Dockerfile +++ b/2.7/wheezy/Dockerfile @@ -1,7 +1,19 @@ FROM buildpack-deps:wheezy -# remove several traces of debian python -RUN apt-get purge -y python.* +# 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. diff --git a/3.3/Dockerfile b/3.3/Dockerfile index c01dd6800..3ef68f81e 100644 --- a/3.3/Dockerfile +++ b/3.3/Dockerfile @@ -1,7 +1,19 @@ FROM buildpack-deps:jessie -# remove several traces of debian python -RUN apt-get purge -y python.* +# 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. diff --git a/3.3/slim/Dockerfile b/3.3/slim/Dockerfile index d71240102..f54ea740b 100644 --- a/3.3/slim/Dockerfile +++ b/3.3/slim/Dockerfile @@ -1,8 +1,5 @@ FROM debian:jessie -# remove several traces of debian python -RUN apt-get purge -y python.* - # 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 a4225e22d..45e63bc11 100644 --- a/3.3/wheezy/Dockerfile +++ b/3.3/wheezy/Dockerfile @@ -1,7 +1,19 @@ FROM buildpack-deps:wheezy -# remove several traces of debian python -RUN apt-get purge -y python.* +# 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. diff --git a/3.4/Dockerfile b/3.4/Dockerfile index b34bc98ce..121e4a518 100644 --- a/3.4/Dockerfile +++ b/3.4/Dockerfile @@ -1,7 +1,19 @@ FROM buildpack-deps:jessie -# remove several traces of debian python -RUN apt-get purge -y python.* +# 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. diff --git a/3.4/slim/Dockerfile b/3.4/slim/Dockerfile index 7c891f66c..b25f47d12 100644 --- a/3.4/slim/Dockerfile +++ b/3.4/slim/Dockerfile @@ -1,8 +1,5 @@ FROM debian:jessie -# remove several traces of debian python -RUN apt-get purge -y python.* - # 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 9f2298901..959aaccac 100644 --- a/3.4/wheezy/Dockerfile +++ b/3.4/wheezy/Dockerfile @@ -1,7 +1,19 @@ FROM buildpack-deps:wheezy -# remove several traces of debian python -RUN apt-get purge -y python.* +# 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. diff --git a/3.5/Dockerfile b/3.5/Dockerfile index 44e6f0ea7..f3971ecf9 100644 --- a/3.5/Dockerfile +++ b/3.5/Dockerfile @@ -1,7 +1,19 @@ FROM buildpack-deps:jessie -# remove several traces of debian python -RUN apt-get purge -y python.* +# 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. diff --git a/3.5/slim/Dockerfile b/3.5/slim/Dockerfile index cb6d1e1bc..2ff34f07e 100644 --- a/3.5/slim/Dockerfile +++ b/3.5/slim/Dockerfile @@ -1,8 +1,5 @@ FROM debian:jessie -# remove several traces of debian python -RUN apt-get purge -y python.* - # 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 115d13af2..2e843cd0e 100644 --- a/3.6/Dockerfile +++ b/3.6/Dockerfile @@ -1,7 +1,19 @@ FROM buildpack-deps:jessie -# remove several traces of debian python -RUN apt-get purge -y python.* +# 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. diff --git a/3.6/slim/Dockerfile b/3.6/slim/Dockerfile index 2bc29a1f1..3ebb25cba 100644 --- a/3.6/slim/Dockerfile +++ b/3.6/slim/Dockerfile @@ -1,8 +1,5 @@ FROM debian:jessie -# remove several traces of debian python -RUN apt-get purge -y python.* - # 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