Skip to content

Use "dpkg-divert" instead of "purge" to avoid Debian's Python #131

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 27, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions 2.7/Dockerfile
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
3 changes: 0 additions & 3 deletions 2.7/slim/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
16 changes: 14 additions & 2 deletions 2.7/wheezy/Dockerfile
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
16 changes: 14 additions & 2 deletions 3.3/Dockerfile
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
3 changes: 0 additions & 3 deletions 3.3/slim/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
16 changes: 14 additions & 2 deletions 3.3/wheezy/Dockerfile
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
16 changes: 14 additions & 2 deletions 3.4/Dockerfile
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
3 changes: 0 additions & 3 deletions 3.4/slim/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
16 changes: 14 additions & 2 deletions 3.4/wheezy/Dockerfile
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
16 changes: 14 additions & 2 deletions 3.5/Dockerfile
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
3 changes: 0 additions & 3 deletions 3.5/slim/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
16 changes: 14 additions & 2 deletions 3.6/Dockerfile
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
3 changes: 0 additions & 3 deletions 3.6/slim/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down