I have setup the private registry using docker run -t -i -p 5000:5000 registry
and it is accessible from 192.168.59.103:5000 (I am using boot2docker). Now I have already pulled an image tutum/tomcat and when I try to push the image (docker push 192.168.59.103:5000/tomcat
) into the registry after tagging it as 192.168.59.103:5000/tomcat I face the following error as shown below --
FATA[0004] Error: v1 ping attempt failed with error: Get https://192.168.59.103:5000/v1/_ping: EOF. If this private regi
stry supports only HTTP or HTTPS with an unknown CA certificate, please add `--insecure-registry 192.168.59.103:5000` to
the daemon's arguments. In the case of HTTPS, if you have access to the registry's CA certificate, no need for the flag
; simply place the CA certificate at /etc/docker/certs.d/192.168.59.103:5000/ca.crt
FROM OTHER POSTS --
I have read some some posts about this where they state that adding DOCKER_OPTS would solve the issue and that it should be added into /etc/default/docker but In my system /etc/default doesn't contain a docker folder as shown from the command sudo ls /etc/default/
which provides the result as a sungle folder aufs.
Another post states that this can be thrawted by simply placing the certificate att /etc/docker/certs.d/192.168.59.103:5000/ca.crt but I am not able to move into the docker directory even when I use sudo as seen below -- for cd /etc/docker
-sh: cd: can't cd to /etc/docker
I have repeated the same process using the registry ip as 0.0.0.0:5000 inside docker (with the assumption the that $boot2docker ip
should be used in the hosts machine and not within docker) -- But that still didn't fix the issue that I am facing.
Please do help me out to sort out this problem. I have added the system specification below --
System Specification:
Microsoft Windows 7 via. boot2docker (CLI version 1.5)
Client version: 1.5.0
Client API version: 1.17
Go version (client): go1.4.1
Git commit (client): a8a31ef
OS/Arch (client): linux/amd64
Server version: 1.5.0
Server API version: 1.17
Go version (server): go1.4.1
Git commit (server): a8a31ef
To use the --insecure-registry
option, add it to the file /var/lib/boot2docker/profile
inside the boot2docker VM. You can get into the VM with boot2docker ssh
. The file contents should look like:
EXTRA_ARGS="--insecure-registry REGISTRY_IP:PORT"
You will then need to restart boot2docker (e.g. boot2docker restart
).
I have no idea why you can't edit /etc/docker
. The following works for me:
docker@boot2docker:~$ sudo ls /etc/docker
key.json