我在这里有一个私人存储库:
https://hub.docker.com/r/istvan/xxx/
当我构建并映像并尝试将其推送到那里时,它会失败并显示以下内容:
docker login
sudo docker push istvan:xxx
错误是:
The push refers to a repository [docker.io/library/istvan]
2456c4c8fd2b: Preparing
5903f32c0854: Preparing
549bd34bfa87: Preparing
08586c0f628f: Preparing
2aebd096e0e2: Preparing
denied: requested access to the resource is denied
答案 0 :(得分:1)
您需要标记要尝试推送的图像以包含存储库名称:
docker tag <image> <username>/<image-name>:<tag>
然后你按下标记的图像:
docker push <username>/<image-name>:<tag>