Leif160519的blog Leif160519的blog

——————

目录
Docker修改字符集
/  

Docker修改字符集

1.临时修改:

 locale
 locale -a 
LANG=C.UTF-8 (有的是zh_CN.UTF-8,不过我在本地没发现这种编码) 
source /etc/profile 

2.永久修改:
修改Dockerfile
在Dockerfile中添加一行

ENV LANG C.UTF-8 

重新制作docker镜像,docker run -ti [镜像] 进入容器后执行locale发现编码格式已经被修改为C.UTF-8,之前出现的中文文件名乱码问题也没有了。


“The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.” – Tom Cargill

标  题Docker修改字符集
作  者Leif160519
出  处https://github.icu/articles/2019/08/22/1566471610217.html
关于博主:坐标南京,运维工程师,如有问题探讨可以直接下方留言。
声援博主:如果您觉得文章对您有帮助,可以评论、订阅、收藏。您的鼓励是博主的最大动力!