Setup Docker service to use insecure(http) registry instead of https

By default docker use https to connect to docker registry. But there can be use cases to use insecure registry. Here are the steps to use insecure registry.

In ubuntu
edit the file /etc/default/docker and update DOCKER_OPTS e.g

DOCKER_OPTS='--insecure-registry 10.84.34.155:5000'

where 10.84.34.155 is ipaddress of registry and 5000 is your port on which registry is configured.

In Centos
Edit the file /etc/docker/daemon.json e.g.

{
"insecure-registries" : ["10.84.34.155:5000"]
}

where 10.84.34.155 is ipaddress of registry and 5000 is your port on which registry is configured.

Restart docker
$ service docker restart

Tagged : / / / / /