Last active
August 29, 2015 14:05
-
-
Save bdelacretaz/e8c75446918968bd7678 to your computer and use it in GitHub Desktop.
How to let Docker containers running with boot2docker know the host mac's IP address
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ curl http://localhost:8000/works.txt | |
ok works | |
$ export IP=$(boot2docker ssh "set | grep SSH_CLIENT" | cut -d"'" -f2 | cut -d" " -f1) | |
$ docker run -e HOST_MAC=$IP busybox sh -c 'wget -q -O - http://$HOST_MAC:8000/works.txt' | |
ok works |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment