brikis98 / docker-osx-dev

A productive development environment with Docker on OS X
http://www.ybrikman.com/writing/2015/05/19/docker-osx-dev/
MIT License
1.43k stars 106 forks source link

Fixed docker-machine ip when using multiple machines. #199

Closed lefeverd closed 7 years ago

lefeverd commented 7 years ago

When using multiple machines with docker-machine, the script currently retrieves the IP of the default one, even when the environment variables are set to use another machine, for instance:

➜ eps-dev docker-machine ls NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS default - virtualbox Running tcp://192.168.99.100:2376 v1.12.5 eps * virtualbox Running tcp://192.168.99.101:2376 v1.12.5

This merge should fix it by specifying the machine name when asking the IP via the docker-machine ip command.

brikis98 commented 7 years ago

LGTM. Thanks for the fix!