docker 倉庫
docker pull centos
docker run -it -d --name mycentosnginx centos
bash docker.sh mycentosnginx
進入容器
yum -y install nginx
修改nginx配置文件
daemon off;
docker commit mycentosnginx liuhx/nginx:v1
[[email protected] ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
liuhx/nginx v1 43b6f702691a 4 minutes ago 368.3 MB
docker.io/centos latest 3bee3060bfc8 12 days ago 192.5 MB
docker.io/nginx latest 958a7ae9e569 2 weeks ago 109.4 MB
docker.io/alpine latest a41a7446062d 3 weeks ago 3.962 MB
[[email protected] ~]#
[[email protected] ~]# docker login https://hub.docker.com
Username: sangge
Password:
Login Succeeded
[[email protected] ~]#
docker tag 7c95851e9f1c docker.io/langge/my_nginx
本文出自 “磚家博客” 博客,請務必保留此出處http://wsxxsl.blog.51cto.com/9085838/1939475
docker 倉庫