【云计算】Docker 镜像如何设置语言环境?bash: warning: setlocale: LC_ALL: cannot change locale (en_US)
2024-09-26 23:30:28
解决方案:
# set default language environment
RUN locale-gen en_US.UTF- \
&& dpkg-reconfigure locales
ENV LC_ALL=en_US.UTF-
ENV LANG=en_US.UTF-
ENV LANGUAGE=en_US.UTF-8 OR:
sudo locale-gen en_US.UTF-8
sudo dpkg-reconfigure locales
vi /etc/default/locale
LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8
重新登录服务器,warning 警告不再出现,问题解决
参考资料:
1、bash: warning: setlocale: LC_ALL: cannot change locale (en_US):
http://blog.163.com/fl_xiang/blog/static/194634512201291231429799/
https://www.xdty.org/912
https://blogs.oracle.com/sakshijain/entry/the_problem_of_setting_locale
http://www.cnblogs.com/ifantastic/p/4565822.html
http://www.tuicool.com/articles/qYrIvm/
2、How to source /etc/profile and save it in docker?
http://stackoverflow.com/questions/31216780/how-to-source-etc-profile-and-save-it-in-docker
3、sudo命令报错
http://www.cnblogs.com/wangkongming/p/4451629.html
最新文章
- jquery 展开折叠效果
- IOS内存管理「4」- ARC 和垃圾回收机制的基本概念
- 最好的10本适用于初学者阅读的javaScript和jQuery书籍
- 《Introduction to Algorithm》-chaper33-计算几何学
- C# 跨线程调用问题
- [jQuery]无法获取隐藏元素(display:none)宽度(width)和高度(height)的新解决方案
- 微信网页授权java实现
- @ModelAttribute--SpringMVC 注解系列文章(二)
- bzoj 3509: [CodeChef] COUNTARI] [分块 生成函数]
- Java中函数的递归调用
- Emmagee--APP性能测试工具的基本使用
- SpringMVC+Spring+Mybatis整合
- Polly 熔断策略
- Windows与Linux的命令行命令对比
- 修改注册表.exe的文件目录
- Elasticsearch从入门到精通之Elasticsearch基本概念
- windows defender和windows firewall
- 用Python写单向链表和双向链表
- November 26th 2016 Week 48th Saturday
- WCF REST 工作总结