docker 修改locale

Last updated on November 22, 2024 pm

🧙 Questions

修改docker的locale为en_US.UTF-8

☄️ Ideas

查看docker中支持的编码

locale
# ping工具
RUN apt-get install -y inetutils-ping
# curl下载工具
RUN apt-get install -y curl
FROM openjdk:8
ADD ispong-admin.jar app.jar
RUN sed -i 's/http:\/\/deb.debian.org/https:\/\/mirrors.aliyun.com/g' /etc/apt/sources.list
RUN sed -i 's/http:\/\/security.debian.org/https:\/\/mirrors.aliyun.com/g' /etc/apt/sources.list
RUN apt-get update
RUN apt-get install -y locales locales-all 
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
ENV TZ=Asia/Shanghai
EXPOSE 8080
CMD java -jar -Xmx2048m app.jar --spring.profiles.active=dev

docker 修改locale
https://ispong.isxcode.com/kubernetes/docker/docker 修改locale/
Author
ispong
Posted on
October 21, 2022
Licensed under