Private Docker Registry Not Connectible to Shell & Web Management UI?


To setup a private docker registry server at path c:\dkrreg on localhost on Windows 10 (x64) system, installed with Docker for Windows, have successfully tried following commands:

docker run --detach --publish 1005:5000 --name docker-registry --volume /c/dkrreg:/var/lib/registry registry:2
docker pull hello-world:latest
docker tag hello-world:latest localhost:1005/hello-world:latest
docker push localhost:1005/hello-world:latest
docker pull localhost:1005/hello-world:latest

Push and Pull from localhost:1005/hello-world:latest via command line succeeds too.

  • Kubernetes: stop CloudSQL-proxy sidecar container in multi container Pod/Job
  • Dockerize ruby script that takes directories as input/output
  • Connecting zeppelin docker with hive
  • AspCore using Docker on Mac
  • Docker daemon config file on boot2docker / docker-machine / Docker Toolbox
  • LogStash container restarts on Kube pod
  • Issue:

    If i use my IP address via docker pull it gives following error in command shell:

    Error response from daemon: Get http: server gave HTTP response to HTTPS client

    When using 3rd party Docker UI Manager via docker run --detach portainer:latest it also shows error to connect as:

    2017/04/19 14:30:24 http: proxy error: dial tcp [::1]:1005: getsockopt: connection refused

    Tried other stuff also. How can I connect my private registry server that is localhost:1005 from LAN using any Docker Management UI tool ?

  • How to allocate percentage of system resources to Docker?
  • Docker with Java: path RUN javac
  • Why my docker container apache service will be shut down everytime I attach my container and then exit?
  • How to test and deploy a Docker production image?
  • How to enable user defined functions in docker instance of cassandra?
  • best way to send docker container logs to logstash
  • 2 Solutions collect form web for “Private Docker Registry Not Connectible to Shell & Web Management UI?”

    At last find solution to this which was tricky

    1. Generated CA private key and certificate as ca-cert-mycompany.pem and ca-cert-key-companyname.pem. And configured docker-compose.yml to save both files as :ro in these locations: /usr/local/share/ca-certificates, /etc/ssl/certs/, /etc/docker/certs.d/ But I also tried only copying certificate to /usr/local/share/ca-certificates was enough as docker will ignore duplicate CA certificates. This extra copying is because at many placed docker fellow recommended the same. I did not executed command: update-ca-certificates this time in registry container but was doing earlier as against what is suggested by many.

    2. Defined in docker-compose.yml: random number as REGISTRY_HTTP_SECRET, and server’s chained certificate (CA certificate appended to end of it) to REGISTRY_HTTP_TLS_CERTIFICATE amd server’s public key to REGISTRY_HTTP_TLS_KEY. Had disabled HTTP authentication. Especially used some naming for file names as found with other certificates in container folder as mysite.com_server-chained-certificate.crt instead of just certificate.crt.

    3. V-Imp: pushed certificate to trusted root in windows using command certutil.exe -addstore root .\Keys\ca-certificate.crt followed with restarting Docker for Windows from taskbar icon and then creating container using docker-compose up -d. This is most important step without this nothing worked.

    Now can perform docker pull

    You need to specify to your Docker daemon that your registry is insecure:

    Based on your OS/system, you need to change the configuration of the daemon to specify the registry address (format IP:PORT, use rather than localhost:1005).

    Once you have done that, you should be able to execute the following:

    docker pull

    You should also be able to access it via Portainer using in the registry field.

    If you want to access your registry using localhost:1005 inside Portainer, you can try to run it inside the host network.

    docker run --detach --net host portainer:latest

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.