Docker Community Forums

Share and learn in the Docker community.

Connecting to a private docker registry on Docker Toolbox (Windows 7)

insecure-registry
docker

(Bkonz) #1

I have setup a private Docker registry on a remote CentOS 7 machine and I would like to connect to it on my Docker Toolbox client. Unfortunately, every time I try to connect to the registry (ex. docker pull $SERVER_IP:5000/hello-world), I get this error: Error response from daemon: Get https://$SERVER_IP:5000/v2/: Tunnel or SSL Forbidden.

How I setup the registry

I’ve tried both an unsecure registry with no certificate with docker run -d -p 5000:5000 registry:2 and a self signed certificate generated with openssl and a common name of $SERVER_IP, then started up the registry with the certs with this command:

docker run -d -p 5000:5000 \
> -v $(pwd)/registry_certs:/certs \
> -e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/domain.cert \
> -e REGISTRY_HTTP_TLS_KEY=/certs/domain.key \
> --restart=always --name registry registry:2

Expected Behavior

The ability to push and pull Docker images to this registry with commands like docker pull $SERVER_IP/hello-world

Actual Behavior

The Docker commands fail to connect to the repo. I can ssh into the repo, but connections on port 5000 seem to fail for some reason.

I am also behind a corporate proxy, but I’ve added $SERVER_IP to the $NO_PROXY environment variable and I’ve added SERVER_IP to the config.json insecure registry variable.