zshuangyan / blog

我的个人博客
2 stars 0 forks source link

解决docker不支持英文的问题 #8

Open zshuangyan opened 6 years ago

zshuangyan commented 6 years ago

如果是在构建镜像阶段,那么只需要在Dockerfile中添加一行

ENV LC_ALL C.UTF-8

如果是已经运行起来的容器,那么使用docker exec -it /bin/bash进入容器中执行

$ echo 'export LANG="en_US.UTF-8"' >> /etc/profile
$ source /etc/profile