It is an important thing to note and that’s why I am repeating it again. You will not be able to push if the images do not have the correct repository names. The docker push command checks the image tags before pushing.
Check out the following two errors.
Error#1:
[email protected]:~$ docker push softwarespice123/devimages:image3
The push refers to repository [docker.io/softwarespice123/devimages]
An image does not exist locally with the tag: softwarespice123/devimages
Error#2:
[email protected]:~$ docker push softwarespice123/devimages:image3
The push refers to repository [docker.io/softwarespice123/devimages]
72e830a4dff5: Preparing
denied: requested access to the resource is denied
In the first error, the Docker Engine is unable to find an image with a tag softwarespice123/devimages
.
In the second error, the Docker Engine is unable to find the repository which is softwarespice123/devimages in Docker Hub.
The images will be pushed smoothly if they have the correct names and tags.
Additionally, you can have colons [:] in the image tags but can not have slash[/] in the images.