buildmaestro
buildmaestro

Reputation: 1446

Add --insecure-registry argument to docker daemon on centos 6

trying to connect the docker daemon on centos 6.6 (non systemd) to our private registry without a cert. Docker documentation says to edit /etc/default/docker to add insecure-registry argument and restart the service, but this has no effect:

$ ps -ef | grep docker
tiiuser  19986 19447  0 10:25 pts/1    00:00:00 grep docker
root     31877     1  0 Apr04 ?        00:00:26 /usr/bin/docker 

How can I add the --insecure-registry argument to the docker daemon in centos 6?

Upvotes: 1

Views: 1967

Answers (1)

buildmaestro
buildmaestro

Reputation: 1446

add the following to:

 vi /etc/sysconfig/docker

 other_args="--insecure-registry <your private registry:port>"

restart the service:

 service docker restart

verify the argument was added:

$ ps -ef | grep docker
tiiuser  19986 19447  0 10:25 pts/1    00:00:00 grep docker
root     31877     1  0 Apr04 ?        00:00:26 /usr/bin/docker -d --  <your private registry url)

To automate this as part of a script:

echo "other_args=\"--insecure-registry <your private registry url>\"" | sudo tee -a /etc/sysconfig/docker

Upvotes: 5

Related Questions