如何上传本地镜像到DockerHub


上传镜像到DockerHub

默认情况下上传后是公开的

[root@harbor ~]# docker images
REPOSITORY                      TAG       IMAGE ID       CREATED        SIZE
jellyfin/jellyfin               latest    360585541fa2   6 months ago   490MB

#将下载的jellyfin镜像打上自己的标签
[root@harbor ~]# docker tag jellyfin/jellyfin:latest chiugui/jellyfin:20210301

[root@harbor ~]# docker images
REPOSITORY                      TAG        IMAGE ID       CREATED        SIZE
chiugui/jellyfin                20210301   360585541fa2   6 months ago   490MB
jellyfin/jellyfin               latest     360585541fa2   6 months ago   490MB

#登录DockerHub
[root@harbor ~]# 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: chiugui  #输入你的dockerhub账号
Password:          #输入你的dockerhub密码
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

#上传镜像到DockerHub
[root@harbor ~]# docker push chiugui/jellyfin:20210301
The push refers to repository [docker.io/chiugui/jellyfin]
a497b16431e5: Mounted from jellyfin/jellyfin
dc683121744a: Mounted from jellyfin/jellyfin
0e0d4eec2a4e: Mounted from jellyfin/jellyfin
d0f104dc0a1f: Mounted from jellyfin/jellyfin
20210301: digest: sha256:010e197041008ffa00d2c94f31b87d64666e9a93a9cf3314ce7f87134b801a5f size: 1165

登录dockerhub,查看自己的仓库,可以看到已经上传了


声明:鹅石壳儿|版权所有,违者必究|如未注明,均为原创|本网站采用BY-NC-SA协议进行授权

转载:转载请注明原文链接 - 如何上传本地镜像到DockerHub


Just Do IT !