Created
February 8, 2017 23:41
-
-
Save ReedD/d0ccbe8e6016ffee72a150df4fba98f8 to your computer and use it in GitHub Desktop.
Let docker connect to host, output host ip.
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 | |
iptables -A INPUT -i docker0 -j ACCEPT | |
# Assumes host has `jq` installed | |
docker network inspect bridge | jq -r .[0].IPAM.Config[0].Gateway |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment