Last Updated: February 25, 2016
·
416
· legittalon

boot2docker auto export ip

If you are using docker on your OSX machine you are using boot2docker. To never have to worry about exporting the DOCKER_HOST variable to properly run your docker commands add this to your shells rc file.

export DOCKER_HOST=`boot2docker socket 2>/dev/null`

This will accurately set the ENV variable to the correct
tcp:// address.