使用阿里云容器镜像服务 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
相关推荐
吠品29 分钟前
高性能JS数组操作:何时选用push、unshift、splice或扩展运算符?
linux·服务器·数据库
fish_xk43 分钟前
Linux中的指令和权限
linux·运维·服务器
暴力求解44 分钟前
Linux---内核态
linux·运维·服务器
mounter6251 小时前
深入理解 Linux 网络新特性:netkit 中的 RX/TX Queue Leasing 与 TCP Devmem
linux·服务器·网络·tcp/ip·kernel
dvjr cloi1 小时前
Linux(CentOS)安装 MySQL
linux·mysql·centos
zhouwy1132 小时前
Linux系统管理命令大全
linux·运维
zhangrelay2 小时前
三分钟云课实践速通--单片机原理与应用--Arduino--SimulIDE--
linux·单片机·嵌入式硬件·学习·ubuntu
zzzyyy5382 小时前
Linux之缓冲区
linux·运维·服务器
hwscom2 小时前
Linux服务器如何进行安全加固,防止黑客攻击(Windows也适用)
linux·服务器·安全
weixin_377634842 小时前
【MinerU】 Docker Compose 使用
docker·容器·mineru