How to get remote access to a private docker-registry?

前端 未结 15 625
攒了一身酷
攒了一身酷 2020-11-30 18:45

I\'m trying to setup a private docker registry using the image taken from: https://github.com/docker/docker-registry

Just by running:
docker run -p 5000:50

15条回答
  •  没有蜡笔的小新
    2020-11-30 18:57

    OK - I found the solution to this - after a day of digging.

    For docker below 1.12.1:

    It turns out that the new client version refuses to work with a private registry without SSL.

    To fix this - the daemon on the client machine should be launched with the insecure flag:

    Just type:

    sudo service docker stop # to stop the service
    

    and then

    sudo docker -d --insecure-registry 10.0.0.26:5000
    

    (replace the 10.0.0.26 with your own ip address).

    I would expect the docker guys to add this option to the pull/push command line...

    Edit - altenantively - you can add the flag to DOCKER_OPTS env variable inside /etc/default/docker... and then sudo service docker restart

    Edit again - It seems that the docker guys are on it - and a fix will come soon: https://github.com/docker/docker/pull/8935

    For docker 1.12.1:

    Please follow below the answer of vikas027 (valid for centos)

提交回复
热议问题