How to config docker registry mirror?

I have learn tutorial from that.I have create docker mirror in this command:

docker run -d -p 5555:5000 -e STORAGE_PATH=/mirror -e STANDALONE=false -e MIRROR_SOURCE=https://registry-1.docker.io -e MIRROR_SOURCE_INDEX=https://index.docker.io -v /Users/v11/Documents/docker-mirror:/mirror  --restart=always --name mirror registry

And it succeed. Then I start my docker daemon using this command:

  • Connect to MySQL Server inside Docker container in an Microsoft Azure VM
  • Build image with a Dockerfile - unknown instruction
  • Docker: How to rely on a local db rather than a db docker container?
  • minikube : not able to connect a locally deployed nginx service
  • Benchmarking contianers in clouds
  • Saltstack docker.login returns APIError: 500 Server Error?
  • docker --insecure-registry 192.168.59.103:5555 --registry-mirror=http://192.168.59.103:5555 -d
    

    Then I use command to pull image like that:

    docker pull hello-world
    

    Then it throw error in log, and more detail is:

    ERRO[0012] Unable to create endpoint for http://192.168.59.103:5555/:
    invalid registry endpoint https://192.168.59.103:5555/v0/: unable to
    ping registry endpoint https://192.168.59.103:5555/v0/ v2 ping attempt
    failed with error: Get https://192.168.59.103:5555/v2/: EOF v1 ping
    attempt failed with error: Get https://192.168.59.103:5555/v1/_ping:
    EOF. If this private registry supports only HTTP or HTTPS with an
    unknown CA certificate, please add --insecure-registry
    192.168.59.103:5555
    to the daemon’s arguments. In the case of HTTPS, if you have access to the registry’s CA certificate, no need for the
    flag; simply place the CA certificate at
    /etc/docker/certs.d/192.168.59.103:5555/ca.crt

    As you can see, it tell me to add ‘–insecure-registry 192.168.59.103:5555’,But I have added it when I start docker daemon. Anyone have idea about it?

  • docker run does not work from cronjob
  • Docker with Compose and Swarm
  • Docker map drive from Docker container to Linux to Windows host
  • Mongodb in Docker: numactl --interleave=all explanation
  • rsync through ssh cannot find uppercase remote host (an other container in Docker)
  • Cannot use mounted host directory from MongoDB with minikube
  • One Solution collect form web for “How to config docker registry mirror?”

    You´re probably using boot2docker?

    Could you try that:

    $ boot2docker init 
    $ boot2docker up 
    $ boot2docker ssh "echo $'EXTRA_ARGS=\"--insecure-registry <YOUR INSECURE HOST>\"' | sudo tee -a /var/lib/boot2docker/profile && sudo /etc/init.d/docker restart"
    

    Taken from here

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