Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker-machine - IP address conflict

Here are my environment:

  • Windows 7 64 bit
  • Docker for windows

When I create new machine, I encounter the IP address conflict:

IP Address conflict

And the console is stuck at phase starting VM

Creating VirtualBox VM... 
Creating SSH key... 
Starting VirtualBox VM... 
Starting VM...

Furthermore, when I press Ctrl-C to stop the script and run eval "$(docker-machine env dev)", I receive following error:

$ eval "$(docker-machine env dev)"
open C:\Users\jacob.phan\.docker\machine\machines\dev\ca.pem: The system cannot
find the file specified.
like image 210
user929794 Avatar asked Jul 07 '15 03:07

user929794


People also ask

Do Docker containers have different IP addresses?

By default, the container is assigned an IP address for every Docker network it connects to. The IP address is assigned from the pool assigned to the network, so the Docker daemon effectively acts as a DHCP server for each container. Each network also has a default subnet mask and gateway.

Can a container have multiple IP addresses?

IP addresses are a separate system from network interfaces, but essentially, you can have multiple IP addresses configured on a single interface, allowing you to bind services to network sockets for each IP:PORT combination.

What IP address does Docker use?

Usually Docker uses the default 172.17. 0.0/16 subnet for container networking.


1 Answers

I was struggling for this problem for a while, in the end, i notice it there is wrong network interface created in boot2docker for new VM:

If you have network different than this, then try to check your network configuration.

Ethernet adapter VirtualBox Host-Only Network:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::6198:761d:eec:5394%18
   IPv4 Address. . . . . . . . . . . : 192.168.56.1
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :

I had one wrong VirtualBox DHCP Network created at that time, which cause the problem. When I deleted, everything goes fine

like image 82
Larry Cai Avatar answered Oct 20 '22 22:10

Larry Cai