Skip to content

Commit a819c92

Browse files
committed
Use "dpkg-divert" instead of "purge" to avoid Debian's Python
1 parent 3e451a9 commit a819c92

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.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy