Updating DOCKER_OPTS when using docker-machine

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?

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:

--label provider=virtualbox