个人笔记,不喜请绕路!
locale 命令来查看有哪些语言支持
[root@0ca5b90999e6 soft]# locale -a|grep utf8
en_AG.utf8
en_AU.utf8
en_BW.utf8
en_CA.utf8
en_DK.utf8
en_GB.utf8
en_HK.utf8
en_IE.utf8
en_IN.utf8
en_NG.utf8
en_NZ.utf8
en_PH.utf8
en_SG.utf8
en_US.utf8
en_ZA.utf8
en_ZM.utf8
en_ZW.utf8
添加环境变量
[root@0ca5b90999e6 soft]# vim /etc/profile
LANG=en_ZW.utf8
[root@0ca5b90999e6 soft]# source /etc/profile
注:
1、docker run时,最好最后加上 /usr/sbin/init,启动systemd (按需求来)
2、另外我的dockerfile 启动命令是 CMD /etc/init.d/sh/init.sh,会多启动一个脚本,其中会自动source,这样就不需要重新构建容器了
#!/bin/bash
source /etc/profile
/usr/sbin/sshd -D
/bin/bash
-----------------------------------end