Skip to content

Instantly share code, notes, and snippets.

@ReedD
Created February 8, 2017 23:41
Show Gist options
  • Save ReedD/d0ccbe8e6016ffee72a150df4fba98f8 to your computer and use it in GitHub Desktop.
Save ReedD/d0ccbe8e6016ffee72a150df4fba98f8 to your computer and use it in GitHub Desktop.
Let docker connect to host, output host ip.
#!/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