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.

  • Docker + Spring Boot Error : could not create Vfs.Dir from url
  • How to upgrade docker container with previous network and volumes?
  • Installing Older Docker Engine specifically - 1.11.0~dev
  • Terraform and docker networking
  • XDebug: Windows + Docker + PHPStorm
  • php-fpm process hight memory usage, and the host jammed
  • 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 ?

  • Kill processes inside docker container after daemon restart
  • getting Docker script to load with git-bash in ConEmu/Cmder
  • Building ASP.NET 5 with Jenkins inside a docker container
  • Binding a port to a host interface using the REST API
  • Install package on Travis-ci with sudo:false [closed]
  • Linux / Fedora sandboxing processes and filesystem changes
  • 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.