Skip to content

Configure docker service to use insecure registry

npchandran edited this page Sep 5, 2017 · 5 revisions

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.

Use insecure registry with http

Http based internal registry may be used in trusted network. This eliminate the need of CA signed certificate for internal use or to trust self signed certificate in all docker nodes.

Below steps need to be done on all docker nodes

  • In ubuntu trusty,
    • edit the file /etc/default/docker and update DOCKER_OPTS
      e.g
DOCKER_OPTS='--insecure-registry 10.84.34.155:5000'
  • In Centos
    • Edit the file /etc/docker/daemon.json
      e.g.
    {
        "insecure-registries" : ["10.84.34.155:5000"]
    }
  • In xenial
    • Edit /etc/docker/daemon.json and update the key "insecure-registries".
      e.g.
    {
        "insecure-registries" : ["10.84.34.155:5000"]
    }
  • restart docker
    service docker restart
Clone this wiki locally