I have an issue where I'm unable to start any docker machines whilst connected to a the WiFi network in my local Starbucks, receiving the following output;
$ docker-machine start
Starting "default"...
(default) Check network to re-create if needed...
Error setting up host only network on machine start: host-only cidr conflicts with the network address of a host interface
This does not happen when connected to my home network, or whilst using my mobile hotspot. Is there any workaround for this?
docker run --network="host" Alternatively you can run a docker container with network settings set to host . Such a container will share the network stack with the docker host and from the container point of view, localhost (or 127.0. 0.1 ) will refer to the docker host.
You can create multiple networks with Docker and add containers to one or more networks. Containers can communicate within networks but not across networks. A container with attachments to multiple networks can connect with all of the containers on all of those networks.
There is a collision between the docker machine and the network that is being set up for wifi. Try creating a new docker machine with other ip:
docker-machine create --driver virtualbox --virtualbox-hostonly-cidr "192.168.123.99/24" mymachine
Use it:
docker-machine env mymachine
This is a new machine in addition to the 'default' one. You might see that it won't have your previous work (images, etc).
Your docker-machine start failed. So either you create new VM or repair existing VM.
For new VM option, use --virtualbox-hostonly-cidr "10.10.10.1/24" (replace 10.10.10.1/24 with whatever subnet you want VM to use.)
For already created VM(start failed), bring up the virtual box UI and change it in the network preferences. Use docker-machine ls to list existing VMs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With