How to find docker-machine ip in commandline in Docker beta OS-X?

Expected behavior

After installing Docker for Mac installer I would want to see the ip address

$ docker-machine ip
192.168.64.8

I would want to install dns server inside docker and use et in my host machine /etc/resolver/test. To do this I would need the ip address of: Docker for Mac to resolve all *.test domains into the xhyve virtual machine. Is there anyway to get the ip address programatically from terminal?

Actual behavior

$ docker-machine ip
Error: No machine name(s) specified and no "default" machine exists.

Information

$ pinata diagnose -u
OS X: version 10.11.4 (build: 15E65)
Docker.app: version v1.11.0-beta8.2
Running diagnostic tests:
[OK]      docker-cli
[OK]      Moby booted
[OK]      driver.amd64-linux
[OK]      vmnetd
[OK]      osxfs
[OK]      db
[OK]      slirp
[OK]      menubar
[OK]      environment
[OK]      Docker
[OK]      VT-x
Docker logs are being collected into /tmp/20160422-143422.tar.gz
Most specific failure is: No error was detected
Your unique id is: A731BA56-0FD3-4DB4-B2A1-AAB15DB2F7E6
Please quote this in all correspondence.

OS-X Version: 10.11.4 (15E65)

1 Like

You do not have a docker-machine any more as far I understand. But you get a domain docker.local that you can ping.

$> ping docker.local
PING docker.local (192.168.64.2): 56 data bytes
64 bytes from 192.168.64.2: icmp_seq=0 ttl=64 time=0.408 ms

Thanks for quick response :). I think because I have used https://github.com/nlf/dlite which also uses that same domain that domain was somehow locked. I uninstalled dlite and now docker.local is working.

in my case docker.local return 127.0.0.1

➜  Downloads ping docker.local
PING docker.local (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.075 ms

I can’t seem to be able to resolve docker.local:

vinay@Vinays-MacBook-Pro ~> ping docker.local
ping: cannot resolve docker.local: Unknown host

Diagnose:

vinay@Vinays-MacBook-Pro ~> pinata diagnose -u
OS X: version 10.11.4 (build: 15E65)
Docker.app: version v1.11.0-beta8.2
Running diagnostic tests:
[OK]      docker-cli
[OK]      Moby booted
[OK]      driver.amd64-linux
[OK]      vmnetd
[OK]      osxfs
[OK]      db
[OK]      slirp
[OK]      menubar
[OK]      environment
[OK]      Docker
[OK]      VT-x
Docker logs are being collected into /tmp/20160425-181924.tar.gz
Most specific failure is: No error was detected
Your unique id is: DB968B29-02F7-450B-8B19-62201F32676A
Please quote this in all correspondence.

Any ideas? I removed VirtualBox and all docker-machine stuff from my old toolbox setup. Any cruft that might be left over that may be conflicting with that domain?

vinayh: You might be having this issue: https://forums.docker.com/t/vpn-compatibiliy-always-enabled/9687

John strangely enough when I did that, restarted my computer, ran into another issue, changed the settings back, restarted again, it’s all working. Very strange.