Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

docker push to private registry – An image does not exist locally with the tag: localhost:5000/xxxx

I have running private registry

sudo docker run -d -p 5000:5000 --restart always --name registry registry:2
sudo docker ps
CONTAINER ID   IMAGE        COMMAND                  CREATED      STATUS       PORTS                                       NAMES
1707fb042a43   registry:2   "/entrypoint.sh /etc…"   4 days ago   Up 2 hours   0.0.0.0:5000->5000/tcp, :::5000->5000/tcp   registry

I have image need to push to my private registry

sudo docker images
REPOSITORY                             TAG       IMAGE ID       CREATED         SIZE
coinbase                               latest    7bfb7cc3d51c   11 months ago   781MB

When I try to push my image to my private registry

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

sudo docker push localhost:5000/coinbase:latest

docker answer me:

The push refers to repository [localhost:5000/coinbase]
An image does not exist locally with the tag: localhost:5000/coinbase

Why? It looks as don’t understanding that localhost:5000 is URL of my private registry. Where is mistake?

>Solution :

You need to tag your image with registry host included

docker image tag coinbase:latest localhost:5000/coinbase:latest

Check docker push documentation for details and examples.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading