As we all known, we can add one --insecure-registry
to the /etc/default/docker
config file to allow insecure registry, like this:
DOCKER_OPTS="$DOCKER_OPTS --insecure-registry myregistry:5000"
My question is: Does it support adding more than one --insecure-registry
since we need to communicate with more than one registries ?
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
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"]
}
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/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With