Home  >  Article  >  Operation and Maintenance  >  Docker container encoding mode setting error

Docker container encoding mode setting error

尚
Original
2020-04-03 15:46:562461browse

Docker container encoding mode setting error

1. Use the locale command to view the container encoding format

Docker container encoding mode setting error

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn