使用阿里云容器镜像服务 ACR

1.搜索镜像

2.使用命名空间

3.从命令行登录阿里云 Registry

bash 复制代码
[root@host1 ~]# docker login crpi-xyb4ez7e48w6bh7l.cn-chengdu.personal.cr.aliyuncs.com
Username: aliyun3109593796
Password: 

WARNING! Your credentials are stored unencrypted in '/root/.docker/config.json'.
Configure a credential helper to remove this warning. See
https://docs.docker.com/go/credential-store/

Login Succeeded

4.将镜像推送到阿里云 Registry

bash 复制代码
[root@host1 ~]# docker tag hello-world crpi-xyb4ez7e48w6bh7l.cn-chengdu.personal.cr.aliyuncs.com/docker_sjl/hello-world
[root@host1 ~]# docker images | grep hello-world
crpi-xyb4ez7e48w6bh7l.cn-chengdu.personal.cr.aliyuncs.com/docker_sjl/hello-world   latest    1b44b5a3e06a   4 weeks ago     10.1kB
hello-world                                                                        latest    1b44b5a3e06a   4 weeks ago     10.1kB

然后执行 docker push 命令推送该镜像

bash 复制代码
[root@host1 ~]# docker tag 1b44b5a3e06a  crpi-xyb4ez7e48w6bh7l.cn-chengdu.personal.cr.aliyuncs.com/docker_sji/hello-world
[root@host1 ~]# docker push crpi-xyb4ez7e48w6bh7l.cn-chengdu.personal.cr.aliyuncs.com/docker_sji/hello-world
Using default tag: latest
The push refers to repository [crpi-xyb4ez7e48w6bh7l.cn-chengdu.personal.cr.aliyuncs.com/docker_sji/hello-world]
53d204b3dc5d: Pushed 
latest: digest: sha256:19459a6bbefb63f83f137f08c1df645f8846e2cd1f44fe209294ebc505e6495e size: 524

5.从阿里云 Registry 拉取镜像

bash 复制代码
[root@host1 ~]# docker pull crpi-xyb4ez7e48w6bh7l.cn-chengdu.personal.cr.aliyuncs.com/docker_sji/hello-world
Using default tag: latest
latest: Pulling from docker_sji/hello-world
Digest: sha256:19459a6bbefb63f83f137f08c1df645f8846e2cd1f44fe209294ebc505e6495e
Status: Image is up to date for crpi-xyb4ez7e48w6bh7l.cn-chengdu.personal.cr.aliyuncs.com/docker_sji/hello-world:latest
crpi-xyb4ez7e48w6bh7l.cn-chengdu.personal.cr.aliyuncs.com/docker_sji/hello-world:latest
相关推荐
阿雄不会写代码1 小时前
AWS | Linux 硬盘挂载综合教程
linux·运维·chrome
Lxinccode2 小时前
python(44) : docker构建支持消费rocketmq的客户端
python·docker·rocketmq·importerror·not found·dynamic library·pyrocketmq
绵羊20233 小时前
ImmuCellAI 免疫浸润分析
linux·python
胡斌附体3 小时前
linux docker 离线 安装
linux·docker·卸载·自启动·离线安装·系统服务
m0_464608263 小时前
Docker从网络管理到容器优化
docker·容器
sibylyue4 小时前
微服务服务治理
微服务·云原生·架构
有梦想的攻城狮4 小时前
Docker进程中的守护进程原理解析
docker·容器·eureka·podman
大聪明-PLUS5 小时前
通过 Telnet 实现自动化
linux·嵌入式·arm·smarc
Lin_Aries_04215 小时前
容器化 Tomcat 应用程序
java·linux·运维·docker·容器·tomcat
努力搬砖的咸鱼6 小时前
云原生之CNCF 是什么
云原生