Docker Community Forums

Share and learn in the Docker community.

Pushing to a repository on DockerHub - name or tag

Hi,

I’m fairly a newbie to Docker about a month of fiddling around. The odd thing I see is when I push an app image to Docker hub and a specific repository it just likes you to use the tag but not the name?
So if I have an image called amweb and its tagged as 2ndtry, the repository is called cont-6. Yet below doesn’t work :

[root@dockerhost1 psweb]# docker push /cont-6/amweb:2ndtry
The push refers to repository [docker.io//cont-6/amweb]
8ce678df51cf: Preparing
c7b4eaf8a793: Preparing
cffa5ccd86eb: Preparing
50644c29ef5a: Preparing
denied: requested access to the resource is denied

What does work is if you remove the image name and just use the tag, so is this normal behavior?

[root@dockerhost1 psweb]# docker push /cont-6:2ndtry
The push refers to repository [docker.io//cont-6]
8ce678df51cf: Pushed
cffa5ccd86eb: Pushed
50644c29ef5a: Pushed
2ndtry: digest: sha256:e956a7e5e856481e13c910babaea16b41c1c701fe208de03ec13c2362965c515 size: 1161