Skip to content

Commit 711a6ff

Browse files
authored
Merge pull request docker-library#131 from infosiftr/dpkg-divert
Use "dpkg-divert" instead of "purge" to avoid Debian's Python
2 parents 3e451a9 + a819c92 commit 711a6ff

File tree

13 files changed

+112
-31
lines changed

13 files changed

+112
-31
lines changed

2.7/Dockerfile

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
FROM buildpack-deps:jessie
22

3-
# remove several traces of debian python
4-
RUN apt-get purge -y python.*
3+
# divert many traces of Debian Python (so that they are not used by mistake)
4+
# https://bugs.debian.org/33263 :(
5+
RUN set -ex \
6+
&& for bits in \
7+
# /etc/python* \
8+
/usr/bin/*2to3* \
9+
/usr/bin/*python* \
10+
/usr/bin/pdb* \
11+
/usr/bin/py* \
12+
# /usr/lib/python* \
13+
# /usr/share/python \
14+
; do \
15+
dpkg-divert --rename "$bits"; \
16+
done
517

618
# http://bugs.python.org/issue19846
719
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.

2.7/slim/Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
FROM debian:jessie
22

3-
# remove several traces of debian python
4-
RUN apt-get purge -y python.*
5-
63
# http://bugs.python.org/issue19846
74
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
85
ENV LANG C.UTF-8

2.7/wheezy/Dockerfile

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
FROM buildpack-deps:wheezy
22

3-
# remove several traces of debian python
4-
RUN apt-get purge -y python.*
3+
# divert many traces of Debian Python (so that they are not used by mistake)
4+
# https://bugs.debian.org/33263 :(
5+
RUN set -ex \
6+
&& for bits in \
7+
# /etc/python* \
8+
/usr/bin/*2to3* \
9+
/usr/bin/*python* \
10+
/usr/bin/pdb* \
11+
/usr/bin/py* \
12+
# /usr/lib/python* \
13+
# /usr/share/python \
14+
; do \
15+
dpkg-divert --rename "$bits"; \
16+
done
517

618
# http://bugs.python.org/issue19846
719
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.

3.3/Dockerfile

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
FROM buildpack-deps:jessie
22

3-
# remove several traces of debian python
4-
RUN apt-get purge -y python.*
3+
# divert many traces of Debian Python (so that they are not used by mistake)
4+
# https://bugs.debian.org/33263 :(
5+
RUN set -ex \
6+
&& for bits in \
7+
# /etc/python* \
8+
/usr/bin/*2to3* \
9+
/usr/bin/*python* \
10+
/usr/bin/pdb* \
11+
/usr/bin/py* \
12+
# /usr/lib/python* \
13+
# /usr/share/python \
14+
; do \
15+
dpkg-divert --rename "$bits"; \
16+
done
517

618
# http://bugs.python.org/issue19846
719
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.

3.3/slim/Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
FROM debian:jessie
22

3-
# remove several traces of debian python
4-
RUN apt-get purge -y python.*
5-
63
# http://bugs.python.org/issue19846
74
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
85
ENV LANG C.UTF-8

3.3/wheezy/Dockerfile

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
FROM buildpack-deps:wheezy
22

3-
# remove several traces of debian python
4-
RUN apt-get purge -y python.*
3+
# divert many traces of Debian Python (so that they are not used by mistake)
4+
# https://bugs.debian.org/33263 :(
5+
RUN set -ex \
6+
&& for bits in \
7+
# /etc/python* \
8+
/usr/bin/*2to3* \
9+
/usr/bin/*python* \
10+
/usr/bin/pdb* \
11+
/usr/bin/py* \
12+
# /usr/lib/python* \
13+
# /usr/share/python \
14+
; do \
15+
dpkg-divert --rename "$bits"; \
16+
done
517

618
# http://bugs.python.org/issue19846
719
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.

3.4/Dockerfile

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
FROM buildpack-deps:jessie
22

3-
# remove several traces of debian python
4-
RUN apt-get purge -y python.*
3+
# divert many traces of Debian Python (so that they are not used by mistake)
4+
# https://bugs.debian.org/33263 :(
5+
RUN set -ex \
6+
&& for bits in \
7+
# /etc/python* \
8+
/usr/bin/*2to3* \
9+
/usr/bin/*python* \
10+
/usr/bin/pdb* \
11+
/usr/bin/py* \
12+
# /usr/lib/python* \
13+
# /usr/share/python \
14+
; do \
15+
dpkg-divert --rename "$bits"; \
16+
done
517

618
# http://bugs.python.org/issue19846
719
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.

3.4/slim/Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
FROM debian:jessie
22

3-
# remove several traces of debian python
4-
RUN apt-get purge -y python.*
5-
63
# http://bugs.python.org/issue19846
74
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
85
ENV LANG C.UTF-8

3.4/wheezy/Dockerfile

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
FROM buildpack-deps:wheezy
22

3-
# remove several traces of debian python
4-
RUN apt-get purge -y python.*
3+
# divert many traces of Debian Python (so that they are not used by mistake)
4+
# https://bugs.debian.org/33263 :(
5+
RUN set -ex \
6+
&& for bits in \
7+
# /etc/python* \
8+
/usr/bin/*2to3* \
9+
/usr/bin/*python* \
10+
/usr/bin/pdb* \
11+
/usr/bin/py* \
12+
# /usr/lib/python* \
13+
# /usr/share/python \
14+
; do \
15+
dpkg-divert --rename "$bits"; \
16+
done
517

618
# http://bugs.python.org/issue19846
719
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.

3.5/Dockerfile

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
FROM buildpack-deps:jessie
22

3-
# remove several traces of debian python
4-
RUN apt-get purge -y python.*
3+
# divert many traces of Debian Python (so that they are not used by mistake)
4+
# https://bugs.debian.org/33263 :(
5+
RUN set -ex \
6+
&& for bits in \
7+
# /etc/python* \
8+
/usr/bin/*2to3* \
9+
/usr/bin/*python* \
10+
/usr/bin/pdb* \
11+
/usr/bin/py* \
12+
# /usr/lib/python* \
13+
# /usr/share/python \
14+
; do \
15+
dpkg-divert --rename "$bits"; \
16+
done
517

618
# http://bugs.python.org/issue19846
719
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.

3.5/slim/Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
FROM debian:jessie
22

3-
# remove several traces of debian python
4-
RUN apt-get purge -y python.*
5-
63
# http://bugs.python.org/issue19846
74
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
85
ENV LANG C.UTF-8

3.6/Dockerfile

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
FROM buildpack-deps:jessie
22

3-
# remove several traces of debian python
4-
RUN apt-get purge -y python.*
3+
# divert many traces of Debian Python (so that they are not used by mistake)
4+
# https://bugs.debian.org/33263 :(
5+
RUN set -ex \
6+
&& for bits in \
7+
# /etc/python* \
8+
/usr/bin/*2to3* \
9+
/usr/bin/*python* \
10+
/usr/bin/pdb* \
11+
/usr/bin/py* \
12+
# /usr/lib/python* \
13+
# /usr/share/python \
14+
; do \
15+
dpkg-divert --rename "$bits"; \
16+
done
517

618
# http://bugs.python.org/issue19846
719
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.

3.6/slim/Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
FROM debian:jessie
22

3-
# remove several traces of debian python
4-
RUN apt-get purge -y python.*
5-
63
# http://bugs.python.org/issue19846
74
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
85
ENV LANG C.UTF-8

0 commit comments

Comments
 (0)