1. Use the locale command to view the container encoding format
2. Permanently modify the container encoding: use it based on the original container Dockerfile builds a new image.
From ufoym/deep0:v2_paddlepaddle ENV LANG C.UTF-8 EXPOSE 8080 22 80 #From 说明在那个原有的镜像基础上构建 #ENV LANG 表示你的容器编码 #EXPOSE 表示你的容器对外暴露的端口号
3. Then run it directly in the directory where the Dockerfile is located:
sudo docker build -t ufoym/deepo:v2 . # ufoym/deepo:v2你的新镜像名字 # . 表示你的Dockerfile文件所在路径(Dockerfile就在当前路径下) sudo nvidia-docker run --name ykk -it -p 8080:8080 -p 10022:22 -p 18888:80 -v /home/hdj/yk/data:/data ufoym/deepo:v2 #创建容器,宿主机端口号8080映射到容器端口8080,宿主机端口号10022映射到容器端口22,宿主机端口号18888映射到容器端口80
For more related tutorials, please pay attention to the docker tutorial column on the PHP Chinese website.
The above is the detailed content of Docker container encoding mode setting error. For more information, please follow other related articles on the PHP Chinese website!