Created
January 23, 2022 03:05
-
-
Save linkdd/4bbd9fc4966e00e067305f1fb8c2588c to your computer and use it in GitHub Desktop.
Get Docker Host IP Address
This file contains 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/sh | |
cat <<EOF | docker run --rm -i alpine:latest sh | |
apk add --no-cache iproute2 >/dev/null | |
ip -4 route show default | cut -d' ' -f3 | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment