User docker constantly restarting when trying to use extra_args [Solved]

I’m attempting to configure the user docker to use an insecure registry, I have the following in my cloud-config.yml

    - daemon
    - --insecure-registry

However I was getting the following error:

   http: server gave HTTP response to HTTPS client

I found this question on the forums:

However when I change args to extra_args and try restarting the docker daemon as the answer suggests, the daemon perpetually restarts itself. So its status is usually something like:

Restarting (1) Less than a second ago

You’re sending a HTTPS request to a port that is expecting HTTP. Insecure registry is still HTTPS (but without verifying the certificate) unless you explicitly say

Hm, thanks for the idea, but no luck.

The way I’m reading the Docker docs, it seems like I should be able to use http. I assumed setting the args in cloud-config.yml would accomplish the same thing described here:
but when I run docker info I don’t see my registry listed under “Insecure Registries”, so it feels like rancher isn’t passing the args to docker.


It’s ok for me with extra_args and 0.7.1 :

storage_driver: overlay
restart: true
tls: false
tls_args: [–tlsverify, --tlscacert=ca.pem, --tlscert=server-cert.pem, --tlskey=server-key.pem,’-H=’]
- --insecure-registry


1 Like

Thanks Max!

Looking at your example, I noticed you were not providing the daemon arg. Removing that and using extra_args is now working as expected!