1、开通阿里云ACR
2、在ACR 中创建命名空间
3、本地安装docker
4、登录到
开通ACR,需要配置访问凭证
[root@master ~]# docker login --username=***lb registry.cn-beijing.aliyuncs.com
Password:
5、给镜像打标签
[root@master ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
prom/prometheus latest 3b907f5313b7 3 weeks ago 245MB
rancher/rancher latest 81ee0878ffcd 7 weeks ago 1.73GB[root@master ~]# docker tag 3b907f5313b7 registry.cn-beijing.aliyuncs.com/huangliangbin1/prometheus:latest
6、上传镜像
[root@master ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
prom/prometheus latest 3b907f5313b7 3 weeks ago 245MB
registry.cn-beijing.aliyuncs.com/huangliangbin1/prometheus latest 3b907f5313b7 3 weeks ago 245MB
rancher/rancher latest 81ee0878ffcd 7 weeks ago 1.73GB
[root@master ~]# docker push registry.cn-beijing.aliyuncs.com/huangliangbin1/prometheus:latest
The push refers to repository [registry.cn-beijing.aliyuncs.com/huangliangbin1/prometheus]
3930de501da9: Pushed
d12fff6feee7: Pushed