Insecure docker registry

Docker deamon options are parameters/options configured for docker deamon. INSECURE_REGISTRY, which is a parameter used to let docker deamon knows a registry is an insecure docker registry, is one of those options. Those options are described more at the docker site:

https://docs.docker.com/articles/systemd/

There are a lot of options we can configure for docker deamon such as: temporary folder for docker, docker registry, ssl certificate for docker…

The problem I am facing is I have an internal docker registry secured with self-certificate . And I got below error when I execute any docker command on this internal registry. For example, when I executed: docker search docker.internal.company:5555, I got this error:

After figuring out, I realized that I need to “tell” docker deamon that the registry is an insecure Docker registry.

I did that by edit the file: /etc/sysconfig/docker (I am using CentOS 7)

Find the key: INSECURE_REGISTRY, uncomment it, and add my insecure registry as the value. For example:

Then I restart the docker to get the setting effected.