Closed rronakk closed 7 years ago
The Dockerfile you pasted has it commented out. With it uncommented does it still do that?
Additionally, can you humor me and also try setting ENV LC_ALL en_US.UTF-8
as described in this AskUbuntu answer?
It looks like LC_ALL
overrides LANG
on Debian:
pswaminathan on debian in ~
$ env
...
LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8
pswaminathan on debian in ~
$ python
Python 2.7.4 (default, Apr 29 2013, 15:18:33)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.getpreferredencoding()
'UTF-8'
>>>
pswaminathan on debian in ~
$ LANG=POSIX python
Python 2.7.4 (default, Apr 29 2013, 15:18:33)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.getpreferredencoding()
'UTF-8'
>>>
pswaminathan on debian in ~
$ LC_ALL=POSIX python
Python 2.7.4 (default, Apr 29 2013, 15:18:33)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.getpreferredencoding()
'ANSI_X3.4-1968'
>>>
So I think LC_ALL
is set to something else by the base container, and LANG
isn't enough to override it.
Yeah, for your previous question.
I tried uncommenting LANG
, and it does not work for me.
Let me try ENV LC_ALL en_US.UTF-8
Same error even after setting ENV LC_ALL en_US.UTF-8
Ok it finally worked using following docker image as base image : https://hub.docker.com/r/pfcarrier/debian-locale/builds/biksnydxmevjscmbkbclu6c/
Not sure if you want to close this issue now.
I have the same issue. The solution is manually setting the LOCALE to UTF8 in the image as rronakk mentioned.
By the way, I noticed this warning message debconf: delaying package configuration, since apt-utils is not installed
in the log. Is it something we need to worry about?
While I am certainly sympathetic to this issue, the issue here is that the Docker image doesn't come out-of-the-box configured to use UTF-8. In my mind, this is an issue of the Docker image in question, not t1-python. I left the issue open originally because I wasn't sure if I wanted to include some instructions in the docs for how to configure it to work correctly. But upon further reflection, it would be documenting an edge case that isn't really relevant otherwise.
Definitely thanks to you both for bringing this up, and I think we'll let this issue serve as a reference for potential future questions on it.
@zachliu : Regarding the message, take a look at this SF answer. This is more of an issue with the Debian image you're using not having apt-utils installed. This is only worrisome if packages you're using require some form of configuration through aptitude before use. If the only packages you're installing through apt-get are Python, pip, etc, I can't see how this would cause real problems. You could try first including a RUN apt-get install -y apt-utils
before any other apt-get lines and see if anything changes.
When user try to pip3 install terminalOne package inside docker container, unicodeDecodeError is seen complete error trace :
Content of the docker file I am trying to build