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

时间:2017-10-08 21:29:39

标签: docker fedora fedora-26

以下序列不起作用:

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

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

看起来docker试图将图像推送到错误的存储库。

1 个答案:

答案 0 :(得分:2)

Fedora默认情况下不使用Docker Hub作为默认存储库。必须明确说明目标回购:

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