简体   繁体   English

如何在Fedora 26上将docker镜像推送到Docker Hub?

[英]How to push a docker image to Docker Hub on Fedora 26?

Following sequence doesn't work: 以下序列不起作用:

# docker login
# docker tag <image-hash> <docker-hub-id>/<name>
# docker push <docker-hub-id>/<name>

fails with 失败了

The push refers to a repository [registry.fedoraproject.org/<docker-hub-id>/<name>]
9c360ae72584: Preparing 
55b267618723: Preparing 
unauthorized: authentication required

It looks like docker tries to push the image to the wrong repository. 看起来Docker试图将图像推送到错误的存储库。

Fedora doesn't use Docker Hub as default repository by default. 默认情况下,Fedora不使用Docker Hub作为默认存储库。 One has to explicitly state the target repo: 必须明确说明目标回购:

# docker login docker.io
# docker tag <image-hash> docker.io/<docker-hub-user-id>/<name>
# docker push docker.io/<docker-hub-user-id>/<name>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM