以下序列不起作用:
# 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试图将图像推送到错误的存储库。
答案 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>