Setting up Docker Registry

Hi everyone! I’m having trouble with the following guide i.e. setting up a local registry Deploy a registry server | Docker Documentation . When I follow the steps listed in the beginning of the guide I always receive the following error. Bin stuck for a while so any help would be appreciated!

The push refers to repository [localhost:5500/my-ubuntu] Get “http://localhost:5500/v2/”: dial tcp [::1]:5500: connect: connection refused

These are the commands I executed:

docker run -d -p 5000:5000 --restart=always --name registry registry:2
 docker pull ubuntu:16.04
 docker tag ubuntu:16.04 localhost:5000/my-ubuntu
 docker push localhost:5000/my-ubuntu

Since your error message shows port 5500 and in your code there is only port 5000, I guess you typed the code here as an example and this is not what you actually executed. Make sure you use the correct ports.