0

So I create a Docker hub image as follows, worked fine

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

A few weeks later I need to rebuild image for new software version, so I did

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

but the final push command fails with

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

Running docker images gives:

[~] # docker images
REPOSITORY                TAG                 IMAGE ID            CREATED             SIZE
songkong/songkong-arm32   latest              d2ab52ce970a        14 minutes ago      179MB
arm32v6/openjdk           8-jre-alpine        d6163b61a7aa        8 days ago          72.9MB
songkong/songkong-arm32   <none>              a57032901b5c        2 weeks ago         169MB
songkong/songkong-arm32   <none>              8f3ae4b75feb        2 weeks ago         162MB
Paul Taylor
  • 13,411
  • 42
  • 184
  • 351
  • Possible duplicate of [denied: requested access to the resource is denied : docker](https://stackoverflow.com/questions/41984399/denied-requested-access-to-the-resource-is-denied-docker) – AmmoPT Nov 02 '18 at 13:07
  • @AmmoPT the answer says I need to tag image, but I have done so dont underdtand what Im doing wrong ? – Paul Taylor Nov 02 '18 at 13:12
  • @AmmoPT okay the problem seems to be my docker login was incorrect, if i just entered docker login and retyped username and a password the push then worked – Paul Taylor Nov 02 '18 at 13:28
  • Hey nice to know, you might wanna reply to your own answer and accept it, it might help others. Have a good one. – AmmoPT Nov 02 '18 at 14:53

2 Answers2

1

The issue seems to be that I wasnt logged onto DockerHub properly

docker login *DockerHubUsername* *DockerHubPassword*

did not return an error, but I tried doing

docker login

and entering username and password at the prompt and then the push worked ok.

Paul Taylor
  • 13,411
  • 42
  • 184
  • 351
0

Are you using Docker for Mac ?

There is a bug with the docker login CLI command.

Please see this github issue and add your experience if you can :

https://github.com/docker/for-mac/issues/2016

xalo
  • 285
  • 1
  • 10