Python is UnicodeEncodeError in CodeBox docker

I built CodeBox by referring to the article here. I'm glad that the collaboration worked without any problems, but when I used Japanese in Python as shown below, ** UnicodeEncodeError ** died and was in trouble.

print u"Hello World"

I thought it was around LANG or locale and tried various things, but it didn't work. Finally, I set the PYTHONENCODING environment variable to solve the problem. The original article is almost the same I decided to run it with the following docker-compose.yml.

data00codebox:
  image: busybox:buildroot-2014.02
  volumes:
    - /home/dockers/data/codebox:/workspace
codebox:
  image: 'javierprovecho/docker-codebox'
  ports:
    - 9000:8000
  environment:
    - LANG=ja_JP.UTF-8
    - PYTHONIOENCODING=utf-8
  volumes_from:
    - data00codebox

It may not be so much, but I hope it helps someone.

Recommended Posts

Python is UnicodeEncodeError in CodeBox docker
What is wheezy in the Docker Python image?
Difference between == and is in python
Use fabric as is in python (fabric3)
Until you put Python in Docker
There is no switch in python
Python in is also an operator
Using venv in Windows + Docker environment [Python]
[FX] Hit oanda-API in Python using Docker
Decorator to avoid UnicodeEncodeError in Python 3 print ()
What is "mahjong" in the Python library? ??
Hash in Perl is a dictionary in Python
How to use is and == in Python
Quadtree in Python --2
Python in optimization
CURL in python
Metaprogramming in Python
Python 3.3 in Anaconda
Geocoding in python
SendKeys in Python
Python is easy
Meta-analysis in Python
Unittest in python
Epoch in Python
Discord in Python
Sudoku in Python
DCI in Python
quicksort in python
nCr in python
N-Gram in Python
Programming in python
Plink in Python
Constant in python
python at docker
What is python
Lifegame in Python.
FizzBuzz in Python
Sqlite in python
StepAIC in Python
N-gram in python
LINE-Bot [0] in Python
Python is instance
Csv in python
Disassemble in Python
Reflection in Python
Constant in python
nCr in Python.
format in python
Scons in Python3
Puyo Puyo in python
python in virtualenv
PPAP in Python
Quad-tree in Python
Reflection in Python
Chemistry in Python
Hashable in python
DirectLiNGAM in Python
LiNGAM in Python
Flatten in python
flatten in python
What is Python