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

前端 未结 15 554
攒了一身酷
攒了一身酷 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 19:15

    I found that docker client version and registry docker version has to match up, else you would run into connectivity issues, despite having everything in place.

    0 讨论(0)
  • 2020-11-30 19:16

    This is what worked for me on CentOS 7.2 and Docker 1.12.1 (latest as on date). My private registry v2 was running on 192.168.1.88:5000, change it accordingly. This also works if you have multiple registries, just keep on adding --insecure-registry IP:Port

    $ sudo vim /usr/lib/systemd/system/docker.service
    #ExecStart=/usr/bin/dockerd 
    ExecStart=/usr/bin/dockerd --insecure-registry 192.168.1.88:5000
    $
    $ sudo systemctl stop docker
    $ sudo systemctl daemon-reload
    $ systemctl start docker
    
    0 讨论(0)
  • 2020-11-30 19:19

    Ubuntu 16.04

    Create (does not exist) file /etc/systemd/system/docker.service.d/registry.conf with contents:

    [Service]
    #You need the below or you 'ExecStart=' or you will get and error 'Service has more than one ExecStart= setting, which is only allowed'
    ExecStart=
    ExecStart=/usr/bin/dockerd -H fd:// --insecure-registry 10.20.30.40:5000
    

    then

    sudo systemctl stop docker
    sudo systemctl daemon-reload
    sudo systemctl start docker
    
    0 讨论(0)
提交回复
热议问题