简体   繁体   中英

'An image does not exist locally with the tag' error in docker PUSH command

I am new to docker. I have the following two docker image files that I downloaded from docker hub

(1) Cassandra:3 
(2) Kong

I have Gitlab Repository into which I want to push these two images. I am able to connect to the Gitlab Registry. I am trying to push the Cassandra:3 Image using the following command.

docker push registry-gitlab.mycompany.com/username/myproject/cassandra:3

When I execute the above command I get the following error.

 The push refers to repository [registry-gitlab.mycompany.com/username/myproject/cassandra]
An image does not exist locally with the tag: registry-gitlab.mycompany.com/username/myproject/cassandra

There is an image called cassandra with tag 3 in the system where I am executing the push command. After going through similar questions in stackoverflow, I assume that this relates to Tag name, but I am not sure what should be the tag name to be assigned to this image or whether updating tags will have any issue.

First you have to tag the docker image,

docker tag Cassandra:3 registry-gitlab.mycompany.com/username/myproject/cassandra:3

Then you can push

docker push registry-gitlab.mycompany.com/username/myproject/cassandra:3

I've tagged my repo. My gitlab docker gives me a 404. I guess I'm with tagging it wrong or have my group/project/image wrong.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM