2

I referred this Stackoverflow question prior to asking this but even though it looks similar that question does not contain the answer for my matter.

I developed Springboot project and created docker image called kubernatesimage in my local machine. So when I run docker images it will list down all the images which I have locally,

REPOSITORY                         TAG       IMAGE ID       CREATED         SIZE
kubernatesimage                    latest    0280b64ac863   15 hours ago    557MB
solr                               latest    e6b43a626b70   3 weeks ago     520MB
apache/zeppelin                    0.9.0     4e276fc244de   5 weeks ago     4.6GB
cassandra                          latest    8baadf8d390f   6 weeks ago     405MB
suhothayan/hadoop-spark-pig-hive   2.9.2     671a17ccce40   18 months ago   2.63GB
loliconneko/oracle-ee-11g          latest    b1ed15c38b8c   24 months ago   5GB

Then I referred this documentation to pull my docker image into dockerhub. So I tagged the image and pushed it by following commands,

docker tag 0280b64ac863 semicolon10/kubernatesimage:firsttry 

docker push semicolon10/kubernatesimage

But it results an error,

The push refers to repository [docker.io/semicolon10/kubernatesimage] tag does not exist: semicolon10/kubernatesimage:latest

Here one thing I noticed is that after docker tag it will create another docker image locally with the assigned tag,

REPOSITORY                         TAG        IMAGE ID       CREATED         SIZE
kubernatesimage                    latest     0280b64ac863   15 hours ago    557MB
semicolon10/kubernatesimage        firsttry   0280b64ac863   15 hours ago    557MB
solr                               latest     e6b43a626b70   3 weeks ago     520MB
apache/zeppelin                    0.9.0      4e276fc244de   6 weeks ago     4.6GB
cassandra                          latest     8baadf8d390f   6 weeks ago     405MB
suhothayan/hadoop-spark-pig-hive   2.9.2      671a17ccce40   18 months ago   2.63GB
loliconneko/oracle-ee-11g          latest     b1ed15c38b8c   24 months ago   5GB

Note: I have successfully logged into my dockerhub account and my dockerhub username is semicolon10. So please can someone point out the issue here?

INDRAJITH EKANAYAKE
  • 3,894
  • 11
  • 41
  • 63

1 Answers1

2

you should:

docker tag 0280b64ac863 docker.io/semicolon10/kubernatesimage:firsttry 

Then push:

docker push docker.io/semicolon10/kubernatesimage:firsttry

Note include the repository : docker.io

Thanh Nguyen Van
  • 10,292
  • 6
  • 35
  • 53
  • Hello, This results the same error-`tag does not exist: semicolon10/kubernatesimage:latest` and one thing I noticed is that in my docker hub new image is creating named `semicolon10/kubernatesimage` locally – INDRAJITH EKANAYAKE Jan 13 '21 at 06:04
  • after `docker tag` do `docker images` to see all images on localhost ? Please show `docker images` here – Thanh Nguyen Van Jan 13 '21 at 06:06
  • `kubernatesimage latest 0280b64ac863 15 hours ago 557MB semicolon10/kubernatesimage firsttry 0280b64ac863 15 hours ago 557MB solr latest e6b43a626b70 3 weeks ago 520MB apache/zeppelin 0.9.0 4e276fc244de 6 weeks ago 4.6GB cassandra latest 8baadf8d390f 6 weeks ago 405MB suhothayan/hadoop-spark-pig-hive 2.9.2 671a17ccce40 18 months ago 2.63GB loliconneko/oracle-ee-11g latest b1ed15c38b8c 24 months ago 5GB` – INDRAJITH EKANAYAKE Jan 13 '21 at 06:07
  • do `docker tag 0280b64ac863 docker.io/semicolon10/kubernatesimage:firsttry` include `docker.io` – Thanh Nguyen Van Jan 13 '21 at 06:08
  • Yes I did sir but it results the same error – INDRAJITH EKANAYAKE Jan 13 '21 at 06:11
  • I added `:firsttry` at the end of docker push command and it worked – INDRAJITH EKANAYAKE Jan 13 '21 at 06:13