I use Docker toolbox for windows and i`m trying run private docker registry from this documentation https://docs.docker.com/registry/deploying/
But it`s not work for me.
Hopefully this will help anyone having issues getting the insecure-registries
fix to work.
Adding
{ "insecure-registries":["host:port"] }
to
/etc/docker/daemon.json
did not work for me until I created the file
/etc/default/docker
and put the line
DOCKER_OPTS="--config-file=/etc/docker/daemon.json"
in it and then restarted the docker daemon with
sudo systemctl stop docker
and sudo systemctl start docker
.
For some reason just doing a sudo systemctl restart docker
did not work. It threw an error about trying to restart the service to quickly.
Also for ["host:port"]
I used the IP of my Docker registry as opposed to the hostname as I did not have DNS or a hosts file setup to be able to find the registry by hostname.
This drove me absolutely nuts until I stumbled upon the /etc/default/docker
bit here.
I am new to Docker and so I don't know if this is new requirement since this initial post was answered or if there was something else I missed when I first setup my registry. Though all I did was to follow the current docs on the Docker site itself.