Loading

docker push出现denied: requested access to the resource is denied

今天想再 把本地的docker image 镜像push 到: https://hub.docker.com/

Step1: login : https://hub.docker.com/

[root@test3 tool]# 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: shenghp
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


Step2: 开始push 镜像: 报错:

denied: requested access to the resource is denied


Step3: 看了网上的经验,原来是tag 镜像的时候,要加上自己docker hub 的用户名:

[root@test3 tool]# docker tag centos/php-70-centos7 shenghp/myphp

root@test3 tool]# docker images
REPOSITORY                         TAG                 IMAGE ID            CREATED             SIZE
centos/php-70-centos7              latest              15d0338a3b42        4 weeks ago         601MB
shenghp/myphp                      latest              15d0338a3b42        4 weeks ago         601MB

Step3: 继续push:

[root@test3 tool]# docker push shenghp/myphp

成功,下面到网页上看一下:

 

 

 

转载于https://blog.csdn.net/shenghuiping2001/article/details/103713885

posted @ 2020-08-06 20:02  luwanglin  阅读(843)  评论(0编辑  收藏  举报