Created
May 17, 2016 12:56
-
-
Save tyrannasaurusbanks/fad4f5180d56d5cbf66c352ca9cc15be to your computer and use it in GitHub Desktop.
Quick pseduo code to test flanneld networking between hosts
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
ssh <host1> | |
CONTAINER=$(docker run -p 9999:9999 -d ubuntu:14.04 nc -l 9999) | |
IP=$(docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $CONTAINER) | |
docker logs -f $CONTAINER | |
<ssh host2> | |
docker run --entrypoint /bin/bash -ti ubuntu:14.04 -i | |
echo "Hello ioan!" | nc $IP 9999 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment