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.
On CentOS 7.2.1511, I had to create a new file
/etc/docker/daemon.json
with the contents
{ "insecure-registries":["host:port"] }
(The host is the hostname of the server hosting my docker registry and port is the port where the docker registry is available. In my case, those are 192.168.99.1:50000)
and then restart docker daemon by doing:
$ sudo service docker restart
If you are using Docker Desktop for Windows:
Click the docker whale icon in the task bar
A menu appears, click Settings
A popup appears, click Daemon
Entry your insecure registry in the "Insecure registries" text area
Click apply
Job done, no need to manually edit any files
If you use windows:
"insecure-registries": [],
by
"insecure-registries": ["192.168.99.1:5000"],
docker system info
then check that 192.168.99.1:5000 exists in "insecure-registries" sectionLooks like you haven't set the Docker Daemon right. Notice these few lines:
Insecure Registries:
127.0.0.0/8
Try to add this line to Docker's daemon.json
file and restart the Docker Daemon:
"insecure-registries":["192.168.99.100:5000"]
If you are using minikube in Windows machine along with minikube addons registry.
1.Find the registry IP. It will be same as minikube IP.
> minikube ip
2.Edit the file:
C:\Users\<username>\.minikube\machines\minikube\config.json
"InsecureRegistry": [
"10.96.0.0/12", // Add coma
"<minikube IP>:5000" //-> Add this line
],
Restart minikube
> minikube start