Skip to content

Instantly share code, notes, and snippets.

@tyrannasaurusbanks
Created March 27, 2015 11:49
Show Gist options
  • Save tyrannasaurusbanks/f1d5717e2116fbb27756 to your computer and use it in GitHub Desktop.
Save tyrannasaurusbanks/f1d5717e2116fbb27756 to your computer and use it in GitHub Desktop.
pipe host ip into /etc/hosts alias from inside container (running net=host)
echo $(netstat -nr | grep '^0\.0\.0\.0' | awk '{print $2}') dockerhost >> /etc/hosts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment