解决docker中发布到docker-hub上The push refers to a repository的报错原因。

解决docker中发布到docker-hub上报错原因详细

一、报错

[root@Docker ~]# docker push jacker666/centos_update:1.0
The push refers to a repository [docker.io-jacker666/centos_update]
An image does not exist locally with the tag: docker.io/jacker666/centos_update

二、解决报错

2.1、先看一下镜像

[root@Docker ~]# docker images 
REPOSITORY            TAG       IMAGE ID       CREATED          SIZE
centos_update         1.0       cfbd4f5b47bc   16 minutes ago   329MB

2.2、需要修改一下镜像名字,如:centos_update 改为jacker666/centos_update

[root@Docker ~]# docker tag cfbd4f5b47bc jacker666/centos_update:1.0

cfbd4f5b47bc为centos_update镜像ID

三、上传至docker-hub

[root@Docker ~]# docker push jacker666/centos_update:1.0
The push refers to repository [docker.io/jacker666/centos_update]
f395f1a62dfd: Pushed 
2653d992f4ef: Mounted from library/centos 
1.0: digest: sha256:2edac51729e8ff8c364bfe8e623610fc4e3e6610467ba322d8897a0c254be9ed size: 741

四、登录docker-hub上预留的邮箱,看看是否收到发布成功的邮件。
在这里插入图片描述

五、登录docker-hub上验证是否上传
解决docker中发布到docker-hub上The push refers to a repository的报错原因。_第1张图片

至此完成已上传!

你可能感兴趣的:(docker,linux)