Docker:发布自己镜像问题denied: requested access to the resource is denied解决方法

问题:

    发布镜像的时候,按照教程执行的,结果没有成功,搜了下,找到解决方法了,记录一下。

    

denied: requested access to the resource is denied

解决方法:

看到这个,只好搜索了。还好,有不少帖子都有。看看下面我的执行步骤

PS C:\WINDOWS\system32> docker images
REPOSITORY              TAG                 IMAGE ID            CREATED             SIZE
learn/ping              latest              6ab895012fc7        About an hour ago   140MB
mreleven/docker-whale   latest              a1096bccdd95        2 years ago         274MB
learn/tutorial          latest              a7876479f1aa        5 years ago         128MB
PS C:\WINDOWS\system32> docker tag learn/ping shoneworn/ping
PS C:\WINDOWS\system32> docker push shoneworn/ping
The push refers to repository [docker.io/shoneworn/ping]
64aad28fc9e6: Pushed
ee1ba0cc9b81: Mounted from learn/ping
latest: digest: sha256:2d9dcd651ff630352be0faad74900ac57415a12809223062377d42c90c50ef8e size: 740
PS C:\WINDOWS\system32> docker images
REPOSITORY              TAG                 IMAGE ID            CREATED             SIZE
learn/ping              latest              6ab895012fc7        About an hour ago   140MB
shoneworn/ping          latest              6ab895012fc7        About an hour ago   140MB
mreleven/docker-whale   latest              a1096bccdd95        2 years ago         274MB
learn/tutorial          latest              a7876479f1aa        5 years ago         128MB
PS C:\WINDOWS\system32> docker run shoneworn/ping ping www.baidu.com
PING www.a.shifen.com (115.239.210.27) 56(84) bytes of data.
64 bytes from 115.239.210.27: icmp_req=1 ttl=37 time=17.7 ms
64 bytes from 115.239.210.27: icmp_req=2 ttl=37 time=57.4 ms
PS C:\WINDOWS\system32>
1.先列出所有镜像
PS C:\WINDOWS\system32> docker images

2.将要发布的镜像改到自己账户名下。我的账户名:shoneworn

PS C:\WINDOWS\system32> docker tag learn/ping shoneworn/ping

3.再次发布镜像

PS C:\WINDOWS\system32> docker push shoneworn/ping

4.再次查看镜像列表

PS C:\WINDOWS\system32> docker images

5.运行自己账户下的镜像测试

PS C:\WINDOWS\system32> docker run shoneworn/ping ping www.baidu.com

运行结果上图中已经有了。

转载请注明:https://blog.csdn.net/shoneworn


另外,如果你在学习的时候遇到过re-exec error: exit status 1: output: Failed to openRelative failed in Win32: open \\?\C:\ProgramData\Docker\windowsfilter\72f0582a1f68b9f9fd0570832f93051270a78b062edef177f04deecb706fe077\usr\share\man\man7\pam.7.gz: Cannot create a file when that file already exists. (0x1f) usr\share\man\man7\pam.7.gz 

请参考我上一篇提帖子

Docker: Win10 拉取镜像失败failed to register layer: re-exec error: exit status 1: output: Failed to openRe

文章参考自:https://blog.csdn.net/xuming9/article/details/78148229





  • 4
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 7
    评论
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值