如何克服对官方推送中docker push拒绝的资源的访问 [英] How to overcome access to resource denied for docker push in official tutorial
问题描述
我用谷歌搜索并看到了这个,但是我不知道它在说什么关于图像标签等:链接
I googled and saw this but I don't know what it is saying about image tags, etc: link
我正在尝试在此处完成本教程:教程正式的Docker
I am trying to complete the tutorial here: tutorial official Docker
这是我的 docker镜像的输出
nobu@nobu-ThinkPad-T420:~/docker/docker-curriculum/flask-app$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
prakhar1989/catnip latest 517dbced092c About an hour ago 700MB
nginx latest 06144b287844 2 weeks ago 109MB
busybox latest e1ddd7948a1c 7 weeks ago 1.16MB
prakhar1989/catnip <none> c984660fe008 7 weeks ago 700MB
hello-world latest 2cb0d9787c4d 2 months ago 1.85kB
python 3-onbuild 292ed8dee366 2 months ago 691MB
prakhar1989/static-site latest f01030e1dcf3 2 years ago 134MB
我不明白的是上面哪列显示了图像名称?我看到一列用于回购的列,然后是用于ID的列,但似乎都不符合要求,本教程跳过了这一关键信息。
What I don't understand is which column above shows the image name? I see a column for repo and then for ID but neither seems to fit the bill and the tutorial skips over this key piece of info.
我能够在 localhost:8888
上运行该应用程序。
I was able to run the app on localhost:8888
.
我不知道为什么要这么做:
I don't know why I am getting:
nobu@nobu-ThinkPad-T420:~/docker/docker-curriculum/flask-app$ docker push prakhar1989/catnip
The push refers to repository [docker.io/prakhar1989/catnip]
f438d02b6568: Preparing
0a0917397206: Preparing
b24e1ed3eb49: Preparing
29778035860f: Preparing
fc88d2431f4d: Preparing
1dc1b82fa010: Waiting
09e3fd9cf357: Waiting
138d1921c15b: Waiting
d714f65bc280: Waiting
fd6060e25706: Waiting
d7ed640784f1: Waiting
1618a71a1198: Waiting
denied: requested access to the resource is denied
我在Docker Hub上有一个帐户,并建立了一个公共存储库。
有人可以提示我需要输入什么命令来推动此操作吗?
I have an account on Docker Hub and set up a public repository. Can someone give me hints on what command I need to enter to push this?
推荐答案
这是我犯的一个常见错误,以为这可能对某人有所帮助。
Here is a common mistake I make, thought this might help someone.
确保在登录和推送期间始终一致地使用 sudo
。 .ie:
Make sure you are consistent in using sudo
across login and push. .i.e:
-
docker登录
后应始终跟随docker push
和 -
sudo docker登录
后应始终跟随sudo docker push
docker login
should always be followed bydocker push
andsudo docker login
should always be followed bysudo docker push
这是因为 sudo docker $的配置c $ c>和
docker
是系统中的不同文件。
This is because of the config for sudo docker
and docker
are different files in the system.
这篇关于如何克服对官方推送中docker push拒绝的资源的访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!