将本地docker镜像上传到阿里云个人镜像仓库

将本地docker镜像上传到阿里云个人镜像仓库

1.登录阿里云Docker Registry
$ sudo docker login --username=username registry.cn-hangzhou.aliyuncs.com
Password:
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded

用于登录的用户名为阿里云账号全名,密码为开通服务时设置的密码。
您可以在访问凭证页面修改凭证密码。

2.查看本地镜像:
[root@localhost ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
nginx latest 540a289bab6c 3 weeks ago 126MB
hello-world latest fce289e99eb9 10 months ago 1.84kB

3.将镜像推送到Registry
这里以hello-world为例,因为文件比较小,测试方便。
[root@localhost ~]# docker tag hello-world registry.cn-hangzhou.aliyuncs.com/wym123/m001:latest
[root@localhost ~]# docker push registry.cn-hangzhou.aliyuncs.com/wym123/m001:latest
The push refers to repository [registry.cn-hangzhou.aliyuncs.com/wym123/m001]
af0b15c8625b: Pushed
latest: digest: sha256:92c7f9c92844bbbb5d0a101b22f7c2a7949e40f8ea90c8b3bc396879d95e899a size: 524

然后,我们登录阿里云在仓库中可以查看到刚才推送的镜像,如下图:
在这里插入图片描述
说明push成功。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值