镜像上传dockerhub全球可用

一. 进入官网创建组织

https://hub.docker.com/repositories

在这里插入图片描述

二. 提交镜像到[docker hub仓库]

1. 查看镜像

[root@tomxiang ~]# docker images
REPOSITORY    TAG       IMAGE ID       CREATED        SIZE
vue           1.0       63e7d56fe2e1   9 days ago     142MB
wordpress     latest    5e77d84df442   2 weeks ago    609MB
mysql         8.0       ff3b5098b416   2 weeks ago    447MB
ordersystem   2.2       c889cd404a75   5 weeks ago    376MB
mysql         latest    7b94cda7ffc7   6 weeks ago    446MB
nginx         latest    670dcc86b69d   2 months ago   142MB

2. 登录login

[root@tomxiang ~]# docker login
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.
Username: xcysuccess
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

3. commit

[root@tomxiang ~]# docker commit nginx xcysuccess/k8s-tutorial:nginx_V1
sha256:52c2a4edb7d1c4e914f509ae2ccb89f967a114673ba8016d8d435891a3a4d477

4. push

[root@tomxiang ~]# docker push xcysuccess/k8s-tutorial:nginx_V1
The push refers to repository [docker.io/xcysuccess/k8s-tutorial]
6826ac3fe308: Pushed 
abc66ad258e9: Mounted from library/nginx 
243243243ee2: Mounted from library/nginx 
f931b78377da: Mounted from library/nginx 
d7783033d823: Mounted from library/nginx 
4553dc754574: Mounted from library/nginx 
43b3c4e3001c: Mounted from library/nginx 
nginx_V1: digest: sha256:f0b480627e1ed427eb87b36d60a04b649fd6b95eeec3251c4bac0f30ea7c189b size: 1782

5. 完整流程

在这里插入图片描述

三. 查看结果

https://hub.docker.com/repositories

在这里插入图片描述

参考文档

  1. 如何将docker 镜像上传到docker hub仓库

猜你喜欢

转载自blog.csdn.net/weixin_45581597/article/details/127809540