HostOnNet Blog

Error: did not detect an –insecure-registry argument on the Docker daemon

When i installed OpenShift on Ubuntu 16.04, i get following error

root@hon-pc-01:~# oc cluster up
-- Checking OpenShift client ... OK
-- Checking Docker client ... OK
-- Checking Docker version ... OK
-- Checking for existing OpenShift container ... OK
-- Checking for image ... 
   Pulling image
   Pulled 1/4 layers, 25% complete
   Pulled 2/4 layers, 50% complete
   Pulled 3/4 layers, 75% complete
   Pulled 4/4 layers, 100% complete
   Image pull complete
-- Checking Docker daemon configuration ... FAIL
   Error: did not detect an --insecure-registry argument on the Docker daemon

     Ensure that the Docker daemon is running with the following argument:


I edited /etc/default/docker, added line


But for some reason, docker will not take this after i restart.

This is fixed by editing systemd unit for docker at

vi /etc/systemd/system/


/usr/bin/dockerd -H fd:// 

Replace with

/usr/bin/dockerd --insecure-registry -H fd:// 

Now reload systemd

systemctl daemon-reload

Restart docker

systemctl stop docker
systemctl start docker

Posted in Linux

  • raman singh

    Although above given solution is correct but a small mistake is there i.e. absence of “=” operator. please try the below one:

    Solution of the problem is :
    1. go to path :
    vi /etc/systemd/system/
    2. In [Service] section :
    under parameter :
    –add-runtime docker-runc=/usr/libexec/docker/docker-runc-current
    –exec-opt native.cgroupdriver=systemd

    #after this add the line given below :

    “–insecure-registry= ”

    3. save the file
    4. systemctl daemon-reload
    5. systemctl stop docker
    6. systemctl start docker