How to allow multiple '--insecure-registry' for docker registry

Docker 17.xx +

  1. Edit the daemon.json file, whose default location is /etc/docker/daemon.json on Linux or C:\ProgramData\docker\config\daemon.json on Windows Server

    If the daemon.json file does not exist, create it.

    {
          "insecure-registries": ["myregistry:5000", "anotherregistry:5000"]
    }
    
  2. Restart Docker for the changes to take effect. In Ubuntu would be like this:

    $ sudo systemctl daemon-reload
    $ sudo systemctl restart docker
    

Find more details in official documentation page https://docs.docker.com/registry/insecure/


You can specify multiple insecure registries by lining them up:

--insecure-registry IP1:PORT --insecure-registry IP2:PORT --insecure-registry IP3:PORT

Source: https://github.com/docker/docker/issues/9026