所以我按如下所示创建了一个Docker hub镜像,效果很好
ctrl + shift
几周后,我需要为新的软件版本重建映像,所以我做了
Created new empty repository in DockerHub
Uploaded my DockerFile to my webserver
ssh *qnapserver*
docker build *DockerFileUrl*
docker login *DockerHubUsername* *DockerHubPassword*
docker images (to get imageId of built image)
docker tag *imageId* *DockerHubNameSpace*/*DockerHubRepository*:latest
docker push *DockerHubNameSpace*/*DockerHubRepository*:latest
,但最后的推送命令失败,并显示
ssh *qnapserver*
docker build *DockerFileUrl*
docker login *DockerHubUsername* *DockerHubPassword*
docker images (to get imageId of built image)
docker tag *imageId* *DockerHubNameSpace*/*DockerHubRepository*:latest
docker push *DockerHubNameSpace*/*DockerHubRepository*:latest
运行docker映像会给出:
The push refers to a repository [docker.io/songkong/songkong-arm32]
d68f3fa1b903: Preparing
a0fcc8fd26d0: Preparing
e921eb3da019: Preparing
30b60a45df09: Preparing
8a9717d91a27: Preparing
fcf19287cca0: Waiting
72b719a20b26: Waiting
denied: requested access to the resource is denied
答案 0 :(得分:1)
问题似乎是我没有正确登录DockerHub
docker login *DockerHubUsername* *DockerHubPassword*
没有返回错误,但我尝试这样做
docker login
,然后在提示符下输入用户名和密码,然后推送正常。
答案 1 :(得分:0)
您是否正在使用Mac的Docker?
docker login
CLI命令存在错误。
请查看此github问题,如果可以,请添加您的经验: