上传docker镜像到阿里云镜像源

阿里云docker镜像配置

阿里云用户名可以使用淘宝系的,或者新注册都行。

a. 配置阿里云的镜像加速器:加速器

然后在线上创建`镜像仓库`,需要设置`命名空间`和`仓库名称`,然后接着操作下面的步骤。

b. 命令行登录到阿里云的doker仓库,--username为阿里云的用户名

$ sudo docker login --username=用户名 registry.cn-hangzhou.aliyuncs.com

c. 给本地镜像打标签:

$ sudo docker tag [ImageId]/[Container-name] registry.cn-hangzhou.aliyuncs.com/命名空间/仓库名:[镜像版本号]

d. 推送到阿里云docker仓库

$ sudo docker push registry.cn-hangzhou.aliyuncs.com/命名空间/仓库名:[镜像版本号]

e. 去阿里云docker仓库查看:列表

详细参考

猜你喜欢

转载自www.cnblogs.com/cpl9412290130/p/11973293.html
今日推荐