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 @   luwanglin  阅读(882)  评论(0编辑  收藏  举报
编辑推荐:
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通
点击右上角即可分享
微信分享提示