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