Docker Community Forums

Share and learn in the Docker community.

Updating DOCKER_OPTS when using docker-machine


(Ibmrob) #1

I am using docker-machine on a Mac and I am trying to update the OPTIONS that docker runs with.

I am trying to add something along the lines of “DOCKER_OPTS=”–insecure-registry my sever.com:5000""

Normally this would be put into the /etc/defaults/docker or similar but how does this work with running under docker-machine?

Do I need to log into the underlying VM and update it there or is there a user friendly option provided by docker-machine?


(Daniel Serodio) #2

Maybe there’s an easier way, but I solved this by following this StackOverflow answer:

If you’d simply like to pass arguments to docker, add them to EXTRA_ARGS in /var/lib/boot2docker/profile. For example:

EXTRA_ARGS='
--label provider=virtualbox
--insecure-registry=docker-registry.example.com:5000
'