1.阿里云镜像发布流程docker
2.镜像生成json
语法:docker commit [OPTIONS] 容器ID [REPOSITORY[:TAG]]vim
[root@pluto data]# docker imagescentos REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE阿里云 centos 6.81 68f963fbef95 4 seconds ago 380.9 MBspa
[root@pluto data]# docker run -it centos:centos6.813d ctrl+p+qblog
[root@pluto data]# docker commit -a pluto -m "new centos6.82 with vim and ifconfig" 097f44f346e3 centos:6.82ci
[root@pluto data]# docker images原型 REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE centos 6.82 68f963fbef95 4 seconds ago 380.9 MB |
3.将镜像push到阿里云
[1].镜像原型
[root@pluto data]# docker images REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE centos 6.82 68f963fbef95 35 minutes ago 380.9 MB |
[2].建立仓库镜像
(1).建立命名空间
(2).建立镜像仓库
[3].镜像推送到registry
$ sudo docker login --username=13023490952 registry.cn-shenzhen.aliyuncs.com $ sudo docker tag [ImageId] registry.cn-shenzhen.aliyuncs.com/pluto_h/centostest:[镜像版本号] $ sudo docker push registry.cn-shenzhen.aliyuncs.com/pluto_h/centostest:[镜像版本号] |
(1).login
[root@pluto /]# sudo docker login --username=13023490952 registry.cn-shenzhen.aliyuncs.com WARNING: login credentials saved in /root/.docker/config.json Login Succeeded |
由于我以前登录过,因此能够不输入密码,不然会提示输入密码
(2).tag
[root@pluto /]# docker images REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE centos 6.82 68f963fbef95 50 minutes ago 380.9 MB [root@pluto /]# sudo docker tag 68f963fbef95 registry.cn-shenzhen.aliyuncs.com/pluto_h/centostest:6.82.1 |
(3).push
[root@pluto /]# sudo docker push registry.cn-shenzhen.aliyuncs.com/pluto_h/centostest:6.82.1 [root@pluto /]# docker images REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE registry.cn-shenzhen.aliyuncs.com/pluto_h/centostest 6.82.1 68f963fbef95 59 minutes ago 380.9 MB |
[4].查询镜像
[5].查看详情
4.pull到docker
[root@pluto /]# docker pull registry.cn-shenzhen.aliyuncs.com/pluto_h/centostest:6.82.1 |