docker镜像push导出 简单配置 push镜像到私有仓库
docker只做自己的镜像:
docker如何push镜像到阿里云
登录阿里云docker registry:
$ sudo docker login --username=阿里云账号 registry.cn-hangzhou.aliyuncs.com
登录registry的用户名是您的阿里云账号全名,密码是您开通namespace时设置的密码。
从registry中拉取镜像:
$ sudo docker pull registry.cn-hangzhou.aliyuncs.com/docker:[镜像版本号]
将镜像推送到registry:
$ sudo docker login --username=阿里云账号 registry.cn-hangzhou.aliyuncs.com $ sudo docker tag [ImageId] registry.cn-hangzhou.aliyuncs.com/docker:[镜像版本号] $ sudo docker push registry.cn-hangzhou.aliyuncs.com/docker:[镜像版本号]
其中[ImageId],[镜像版本号]请你根据自己的镜像信息进行填写。
sample:
使用docker tag重命名镜像,并将它通过私网ip推送至registry:
$ sudo docker images REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE registry.aliyuncs.com/acs/agent 0.7-dfb6816 37bb9c63c8b2 7 days ago 37.89 MB $ sudo docker tag 37bb9c63c8b2 registry.cn-hangzhou.aliyuncs.com/acs/agent:0.7-dfb6816
通过docker images 找到您的imageId 并对于改imageId重命名镜像domain到registry内网地址。
$ sudo docker push registry.cn-hangzhou.aliyuncs.com/acs/agent
从内网push镜像,速度将大大提升,并且将不会损耗您的公网流量。注意,如果您申请的机器是在vpc网络的,请使用registry-cn-hangzhou-vpc.aliyuncs.com的域名前缀进行推送。
制作docker镜像 简单配置 可自动构建镜像
本文链接二维码可以保存在本地:保存
http://phpersay.com/index.php?c=index&m=articleDetailInfo&id=56
分类 其他 | 浏览 (2377) | 赞 (0) | 踩 (0) | | 2017-01-13 17:24:49 |
相关文章
- Mac 终端查看外网IP
- 用古诗吵架的小两口
- Mac下brew卸载php7重新安装php7
- Mac yld: Library not loaded: /usr/local/opt/jpeg/lib/libjpeg.8.dylib
- Mac homebrew install php7自定义参数生成libphp7.so
- Mac brew安装多个版本PHP