fnichol / dvm

An on demand Docker virtual machine, thanks to Vagrant and boot2docker. Works great on Macs and other platforms that don't natively support the Docker daemon. Support VirtualBox, VMware, and Parallels.
http://fnichol.github.io/dvm
Apache License 2.0
457 stars 67 forks source link

Just use localhost for DOCKER_IP? #36

Closed winmillwill closed 10 years ago

winmillwill commented 10 years ago

I'm sure I'm missing something, but when I bring up dvm with vmware fusion, it seems to have good network config:

docker@boot2docker:~$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN
    link/ether 72:4c:bb:80:e7:16 brd ff:ff:ff:ff:ff:ff
3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:0c:29:14:93:b2 brd ff:ff:ff:ff:ff:ff
    inet 192.168.149.131/24 brd 192.168.149.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::20c:29ff:fe14:93b2/64 scope link
       valid_lft forever preferred_lft forever
4: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
    link/ether 00:0c:29:14:93:bc brd ff:ff:ff:ff:ff:ff
    inet 192.168.42.43/24 brd 192.168.42.255 scope global eth1
       valid_lft forever preferred_lft forever
5: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN
    link/ether 56:84:7a:fe:97:99 brd ff:ff:ff:ff:ff:ff
    inet 172.17.42.1/16 scope global docker0
       valid_lft forever preferred_lft forever

But I simply can't connect to that ip or port, eg telnet times out.

Thanks to the port forwarding we do anyway, 127.0.0.1 works fine and seems like it would always work no matter how dhcp ends up shaking out. So, this seems like the most sane default, or like I'm doing something dumb.

Please advise.

jacobat commented 10 years ago

You should be able to connect from your host OS to 192.168.42.43. (I'm not sure if that's what you're trying to do?)

dlitz commented 10 years ago

It works, but perhaps it shouldn't work. See issue #40.

fnichol commented 10 years ago

Hi @winmillwill, looks like you might be running into an issue with Vagrant 1.6.0+ and the VMware Fusion provider, which results in boot2docker not booting correctly. If not, could I get you to try the 0.6.0 release? I have a quick blog post which speaks to the Docker port forward and Vagrant/VMware issue if that's helpful.

If you're still having issues, then we can either re-open this issue, or start a fresh one that's targeted at getting the private IP address TCP port working. Thanks!