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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM