Created
June 9, 2016 23:57
-
-
Save longshorej/c34c99c55a1f0c881d88e5eda3397d67 to your computer and use it in GitHub Desktop.
docker containers access docker host via /etc/hosts
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
#!/bin/bash | |
set -e | |
HPN_DOCKER_HOST=`/sbin/ip route | awk '/default/ { print $3 }'` | |
echo "$HPN_DOCKER_HOST docker" >> /etc/hosts | |
# exec ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment