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

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

    Docker 1.12.1

    For CentOS 7.2

    /usr/lib/systemd/system/docker.service
    #ExecStart=/usr/bin/dockerd
    ExecStart=/usr/bin/dockerd --insecure-registry my-docker-registry.com:5000
    

    For ubuntu 16.04

    /lib/systemd/system/docker.service
    #ExecStart=/usr/bin/dockerd -H fd://
    ExecStart=/usr/bin/dockerd --insecure-registry my-docker-registry.com:5000 -H fd://
    
    sudo systemctl stop docker
    sudo systemctl daemon-reload
    sudo systemctl start docker
    

    It seems the --insecure-registry option may be used both with and without the "=" between it and the registry ID.

提交回复
热议问题