0
votes

I need to modify the docker daemon'a arguments in OSX.

I got an error when pull a private repository without certificate.

2014/11/11 13:40:02 Error: Invalid registry endpoint https://registry.af-sys.com/v1/: Get https://registry.af-sys.com/v1/_ping: dial tcp 54.229.102.95:443: i/o timeout. If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add --insecure-registry registry.af-sys.com 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/registry.af-sys.com/ca.crt

According to this message I should modify the daemon arguments. How can I do that?

2
Right now I'm changing the init script (/etc/init.d/docker) in the virtual machine. Line 98: /usr/local/bin/docker -d -D -g "$DOCKER_DIR" -H unix:// $DOCKER_HOST $EXTRA_ARGS --insecure-registry registry.af-sys.com >> "$DOCKER_LOGFILE" 2>&1 & - alasarr
/var/lib/boot2docker/profile is available to set variables such as EXTRA_ARGS, in preference to editing the script. - Bryan

2 Answers

4
votes

Following Bryan's note, I added the following to the boot2docker profile:

boot2docker ssh -t sudo vi /var/lib/boot2docker/profile

# Insecure Registry
EXTRA_ARGS="--insecure-registry registry.af-sys.com"

boot2docker restart
0
votes

If you're running Docker for Mac, you can set up some arguments in the UI Preferences:

enter image description here

For example:

  • add Insecure registries
  • add Registry mirrors
  • change the HTTP proxy settings

enter image description here