docker,学习

commit镜像

docker commit   提交容器称为一个新的副本
# 命令和git原理类似
docker commit -m "提交的描述信息" -a "作者" 容器id 目标镜像名:[TAG]

测试

root@ubuntu:~# docker images
REPOSITORY   TAG       IMAGE ID       CREATED         SIZE
nginx        latest    605c77e624dd   9 months ago    141MB
tomcat       latest    fb5657adc892   9 months ago    680MB
centos       latest    5d0da3dc9764   13 months ago   231MB
root@ubuntu:~# docker commit -a "longdaiquan" -m "add webapps" 1a3943f69ff9 mytomcat:1.0
sha256:15b8e18007896bd69e5f0e2e8d74eb4c035b64f5e3fc1e27774f91f7abab2909
root@ubuntu:~# docker images
REPOSITORY   TAG       IMAGE ID       CREATED         SIZE
mytomcat     1.0       15b8e1800789   3 seconds ago   684MB
nginx        latest    605c77e624dd   9 months ago    141MB
tomcat       latest    fb5657adc892   9 months ago    680MB
centos       latest    5d0da3dc9764   13 months ago   231MB
root@ubuntu:~# docker run -d -p 80:8080 --name mytomcat01 mytomcat
Unable to find image 'mytomcat:latest' locally
^C
root@ubuntu:~# docker run -d -p 80:8080 --name mytomcat01 mytomcat:1.0
d9334c2609b7b93bc60419701a8d3b4a7d352032a2b2f8bf54ef8c88918aebc7
root@ubuntu:~# 
微信支付

微信支付

支付宝支付

支付宝支付

评论

This is just a placeholder img.