inviqa / dock-cli

Dock CLI
MIT License
39 stars 14 forks source link

The VM network is not properly set on docker-machine-based VMs #98

Closed sroze closed 8 years ago

sroze commented 8 years ago

Docker-machine adds a label in the EXTRA_ARGS variable of /var/lib/boot2docker/profile so dock-cli is not properly updating the file.

https://github.com/inviqa/dock-cli/blob/master/src/Installer/DNS/Mac/DnsDock.php#L99-L104

sroze commented 8 years ago

For example, @jamescowie had this /var/lib/boot2docker/profile file:


EXTRA_ARGS='
--label provider=virtualbox
'
CACERT=/var/lib/boot2docker/ca.pem
DOCKER_HOST='-H tcp://0.0.0.0:2376'
DOCKER_STORAGE=aufs
DOCKER_TLS=auto
SERVERKEY=/var/lib/boot2docker/server-key.pem
SERVERCERT=/var/lib/boot2docker/server.pem
svalaskevicius commented 8 years ago

workaround:

docker-machine ssh dinghy
vi /var/lib/boot2docker/profile

# In the `EXTRA_ARGS` variable, adds:
-H unix:///var/run/docker.sock --bip=172.17.42.1/16 --dns=172.17.42.1
# after `--label`, new line

dock-cli docker:restart

thanks @sroze