上传docker镜像到docker hub 报错

报错信息

[root@glt6 docker]# docker push ggg/nginx:1.0
The push refers to repository [docker.io/ggg/nginx]
ee13bda7e5cd: Preparing 
55b54af06f07: Preparing 
aa7862202d70: Preparing 
cd5e041d733b: Preparing 
db9f7448906c: Preparing 
fc9e3b1ceca8: Waiting 
9494a95add93: Waiting 
36bda480550d: Waiting 
84d062c3483a: Waiting 
174f56854903: Waiting 
denied: requested access to the resource is denied #  请求访问的资源被拒绝     上传镜像报错  

解决思路

怕是之前上传过nginx镜像
先给镜像打个标签 再上传

[root@glt6 docker]# docker tag ff3343a25b9f ggg/nginx:1.0

[root@glt6 docker]# docker push ggg/nginx:1.0
The push refers to repository [docker.io/ggg/nginx]
ee13bda7e5cd: Preparing 
55b54af06f07: Preparing 
aa7862202d70: Preparing 
cd5e041d733b: Preparing 
db9f7448906c: Preparing 
fc9e3b1ceca8: Waiting 
9494a95add93: Waiting 
36bda480550d: Waiting 
84d062c3483a: Waiting 
174f56854903: Waiting 
denied: requested access to the resource is denied

还是出现了之前的报错

解决方法

是上传到dockerhub没有找到用户,要在镜像前面加上用户,首先我们先登录dockerhub

[root@glt6 ~]# docker login -u 1586836547ggg
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

重新打个标签

[root@glt6 docker]# docker push 1586836547ggg/nginx:2.0

上传镜像
[root@glt6 docker]# docker push 1586836547ggg/nginx:2.0
The push refers to repository [docker.io/1586836547ggg/nginx]
ee13bda7e5cd: Retrying in 1 second 
55b54af06f07: Retrying in 1 second 
aa7862202d70: Retrying in 1 second 
cd5e041d733b: Retrying in 5 seconds 
db9f7448906c: Retrying in 5 seconds 
fc9e3b1ceca8: Waiting 
9494a95add93: Waiting 
36bda480550d: Waiting 
84d062c3483a: Waiting 
174f56854903: Waiting 



上传成功 报错解决

上传docker镜像到docker hub 报错_第1张图片

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