创建aliyun镜像仓库
创建aliyun镜像仓库
登陆地址:cr.console.aliyun.com
命令行登陆仓库
[root@centos7 ~]#docker login --username=xp018970 registry.cn-beijing.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
查看当前镜像
#docker images REPOSITORY TAG IMAGE ID CREATED SIZE 172.18.141.24/linux35/centos v1 9f38484d220f 2 weeks ago 202MB 172.18.142.3/linux35/centos v1 9f38484d220f 2 weeks ago 202MB centos latest 9f38484d220f 2 weeks ago 202MB 172.18.142.3/linux35/ubuntu v1 94e814e2efa8 3 weeks ago 88.9MB
镜像打tag
#docker tag centos:latest registry.cn-beijing.aliyuncs.com/xp018970/centos:v1
镜像上传到仓库
#docker push registry.cn-beijing.aliyuncs.com/xp018970/centos:v1 The push refers to repository [registry.cn-beijing.aliyuncs.com/xp018970/centos] d69483a6face: Pushed v1: digest: sha256:ca58fe458b8d94bc6e3072f1cfbd334855858e05e1fd633aa07cf7f82b048e66 size: 529
验证上传的镜像
下载镜像
#docker pull registry.cn-beijing.aliyuncs.com/xp018970/centos:v1 v1: Pulling from xp018970/centos Digest: sha256:ca58fe458b8d94bc6e3072f1cfbd334855858e05e1fd633aa07cf7f82b048e66 Status: Image is up to date for registry.cn-beijing.aliyuncs.com/xp018970/centos:v1
FYI:https://note.youdao.com/ynoteshare/index.html?id=1890f2ba9e6dd5f6a812767f375cb2c0&type=note&_time=1648971628836