镜像仓库——阿里云

[root@hmm ~]# vi /etc/docker/daemon.json
[root@hmm ~]# systemctl daemon-reload
[root@hmm ~]# systemctl restart docker
[root@hmm ~]# cat /etc/docker/daemon.json 
{

  "registry-mirrors":["https://registry.docker-cn.com"]

}
[root@hmm ~]# 

[root@hmm ~]# docker login --username=aliyun0475555124 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
[root@hmm ~]#  docker build -t registry.cn-hangzhou.aliyuncs.com/hanmiao_03/hmmmm:24.03.26 .
[+] Building 0.1s (5/5) FINISHED                                                            docker:default
 => [internal] load build definition from Dockerfile                                                  0.0s
 => => transferring dockerfile: 79B                                                                   0.0s
 => [internal] load .dockerignore                                                                     0.0s
 => => transferring context: 2B                                                                       0.0s
 => [internal] load build context                                                                     0.0s
 => => transferring context: 28B                                                                      0.0s
 => CACHED [1/1] COPY hello /                                                                         0.0s
 => exporting to image                                                                                0.0s
 => => exporting layers                                                                               0.0s
 => => writing image sha256:e8c9e00260a8e1518736ea7a6b7d596a61cf3bd7d4e04bc19be0cf2f417cf28a          0.0s
 => => naming to registry.cn-hangzhou.aliyuncs.com/hanmiao_03/hmmmm:24.03.26                          0.0s
[root@hmm ~]# docker images
REPOSITORY                                           TAG        IMAGE ID       CREATED         SIZE
centos-with-nginx                                    latest     fe0f7fc1d27c   13 days ago     248MB
imglayers-test                                       latest     3d2d641327e8   13 days ago     196MB
my-hello                                             latest     e8c9e00260a8   2 weeks ago     861kB
registry.cn-hangzhou.aliyuncs.com/hanmiao_03/hmmmm   24.03.26   e8c9e00260a8   2 weeks ago     861kB
ubuntu                                               latest     ca2b0f26964c   3 weeks ago     77.9MB
httpd                                                latest     ac45b24b92cc   2 months ago    167MB
ubuntu                                               18.04      f9a80a55f492   10 months ago   63.2MB
hm/ubuntu                                            hhh        f9a80a55f492   10 months ago   63.2MB
hello-world                                          latest     d2c94e258dcb   10 months ago   13.3kB
centos                                               latest     5d0da3dc9764   2 years ago     231MB
ubuntu                                               14.04      13b66b487594   3 years ago     197MB
[root@hmm ~]# docker push registry.cn-hangzhou.aliyuncs.com/hanmiao_03/hmmmm:24.03.26
The push refers to repository [registry.cn-hangzhou.aliyuncs.com/hanmiao_03/hmmmm]
489199a05e67: Pushed 
24.03.26: digest: sha256:b44cd7cf49ecca2044d5ff0c7f1ccfdc49e68d1edb8ee098eef261b7ee452bbe size: 526

posted on   代码你敲我不敲  阅读(52)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· 【自荐】一款简洁、开源的在线白板工具 Drawnix

导航

统计

返回顶端
点击右上角即可分享
微信分享提示