Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

docker

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.

like image 269
KurioZ7 Avatar asked Oct 26 '18 09:10

KurioZ7


1 Answers

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
like image 171
Dilan Tharaka Avatar answered Oct 20 '22 01:10

Dilan Tharaka