Skip to content

Commit 6003dae

Browse files
authored
Merge pull request docker-library#278 from infosiftr/python2-io-encoding
Set PYTHONIOENCODING for Python 2
2 parents 016aedf + 2c06746 commit 6003dae

File tree

8 files changed

+16
-0
lines changed

8 files changed

+16
-0
lines changed

2.7/alpine3.4/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ ENV PATH /usr/local/bin:$PATH
66
# http://bugs.python.org/issue19846
77
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
88
ENV LANG C.UTF-8
9+
# https://github.com/docker-library/python/issues/147
10+
ENV PYTHONIOENCODING UTF-8
911

1012
# install ca-certificates so that HTTPS works consistently
1113
# the other runtime dependencies for Python are installed later

2.7/alpine3.6/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ ENV PATH /usr/local/bin:$PATH
66
# http://bugs.python.org/issue19846
77
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
88
ENV LANG C.UTF-8
9+
# https://github.com/docker-library/python/issues/147
10+
ENV PYTHONIOENCODING UTF-8
911

1012
# install ca-certificates so that HTTPS works consistently
1113
# the other runtime dependencies for Python are installed later

2.7/alpine3.7/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ ENV PATH /usr/local/bin:$PATH
66
# http://bugs.python.org/issue19846
77
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
88
ENV LANG C.UTF-8
9+
# https://github.com/docker-library/python/issues/147
10+
ENV PYTHONIOENCODING UTF-8
911

1012
# install ca-certificates so that HTTPS works consistently
1113
# the other runtime dependencies for Python are installed later

2.7/jessie/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ ENV PATH /usr/local/bin:$PATH
66
# http://bugs.python.org/issue19846
77
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
88
ENV LANG C.UTF-8
9+
# https://github.com/docker-library/python/issues/147
10+
ENV PYTHONIOENCODING UTF-8
911

1012
# runtime dependencies
1113
RUN apt-get update && apt-get install -y --no-install-recommends \

2.7/jessie/slim/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ ENV PATH /usr/local/bin:$PATH
66
# http://bugs.python.org/issue19846
77
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
88
ENV LANG C.UTF-8
9+
# https://github.com/docker-library/python/issues/147
10+
ENV PYTHONIOENCODING UTF-8
911

1012
# runtime dependencies
1113
RUN apt-get update && apt-get install -y --no-install-recommends \

2.7/stretch/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ ENV PATH /usr/local/bin:$PATH
66
# http://bugs.python.org/issue19846
77
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
88
ENV LANG C.UTF-8
9+
# https://github.com/docker-library/python/issues/147
10+
ENV PYTHONIOENCODING UTF-8
911

1012
# runtime dependencies
1113
RUN apt-get update && apt-get install -y --no-install-recommends \

2.7/stretch/slim/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ ENV PATH /usr/local/bin:$PATH
66
# http://bugs.python.org/issue19846
77
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
88
ENV LANG C.UTF-8
9+
# https://github.com/docker-library/python/issues/147
10+
ENV PYTHONIOENCODING UTF-8
911

1012
# runtime dependencies
1113
RUN apt-get update && apt-get install -y --no-install-recommends \

2.7/wheezy/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ ENV PATH /usr/local/bin:$PATH
66
# http://bugs.python.org/issue19846
77
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
88
ENV LANG C.UTF-8
9+
# https://github.com/docker-library/python/issues/147
10+
ENV PYTHONIOENCODING UTF-8
911

1012
# runtime dependencies
1113
RUN apt-get update && apt-get install -y --no-install-recommends \

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