How can I constantly update DOCKER_OPTS in docker machine

After updating the docker machine, I have no idea how to update DOCKER_OPTS in the local boot docker machine and save it forever

 $ docker-machine ls NAME ACTIVE DRIVER STATE URL SWARM dev * virtualbox Running tcp://192.168.99.100:2376 

I tried ssh in vm with docker-machine ssh dev and updated /etc/docker/default . But the changes are discarded after restarting the VM using docker-machine restart dev .

+7
docker boot2docker docker-machine
source share
2 answers

Like the docker machine 0.5.0, the mirror can be equipped with --engine-registry-mirror

 docker-machine create -d virtualbox --engine-registry-mirror http://mirror.dockerhub.com dev 

- engine-registry-mirror [-engine-registry-mirror option option -engine-registry-mirror option] Specify registry mirrors to use

+3
source share

If you just want to pass the arguments to the docker, add them to EXTRA_ARGS in /var/lib/boot2docker/profile . For example:

 EXTRA_ARGS=' --label provider=virtualbox --insecure-registry=10.0.0.1:5000 ' 

The docker process is started via /etc/init.d/docker , which reports /var/lib/boot2docker/profile . $EXTRA_ARGS is passed transparently to the docker process at the end of start() .

+9
source share

All Articles