Skip to content

Instantly share code, notes, and snippets.

@blasterpal
Created August 9, 2015 17:31
Show Gist options
  • Select an option

  • Save blasterpal/fae3bee5b7cc0eb0b75a to your computer and use it in GitHub Desktop.

Select an option

Save blasterpal/fae3bee5b7cc0eb0b75a to your computer and use it in GitHub Desktop.
Adding DockerHost ip to container
$ alias hostip="ip route show 0.0.0.0/0 | grep -Eo 'via \S+' | awk '{ print \$2 }'"
$ docker run --add-host=docker:$(hostip) --rm -it debian
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment