Beta9: Local Docker Registry Connection Refused

Following the instruction here: Registry | Docker Docs I am unable to get past Pushing my image to my repo on my mac.

docker push localhost:5000/ubuntu

I expect it to push just fine, but it fails with a connection refused with nothing more then that.

Here is what I get back from my push.

docker push localhost:5000/ubuntu
The push refers to a repository [localhost:5000/ubuntu]
Put http://localhost:5000/v1/repositories/ubuntu/: dial tcp [::1]:5000: getsockopt: connection refused

Everything is default settings with nothing special in my host file.

docker version

Version: 1.11.0
API version: 1.23
Go version: go1.5.4
Git commit: 4dc5990
Built: Wed Apr 13 19:36:04 2016
OS/Arch: darwin/amd64

Version: 1.11.0
API version: 1.23
Go version: go1.5.4
Git commit: a5315b8
Built: Tue Apr 26 15:23:39 2016
OS/Arch: linux/amd64

I am not sure why my machine would not be responding correctly to the push command. I felt it was something to do with the version information but I think docker push would handle that properly.

Any advice is greatly appreciated. I am on Version 1.11.0-beta9 (build: 6388)

This is a Beta9 issue. I installed Beta7 again and everything went back to normal.

How exactly are you running the registry? I’ve seen several reports (myself included) of --net host not working on Beta 9, but normal docker run -p does fine.

I’ve noticed exactly the same issue today. Pretty much the same setup as @justinp

Me too. I was able to get it working by setting --net host

Nothing special. Just like in the tutorial.

docker run -d -p 5000:5000 --restart=always --name registry registry:2

docker pull ubuntu && docker tag ubuntu localhost:5000/ubuntu

This is where it blows up. docker push localhost:5000/ubuntu

Using the latest 1.11.1 beta (Version 1.11.1-beta10 (build: 6662)) seems to have resolved the problem. :smile:

Ah good, sorry about the teething issues.

1 Like