Skip to content

Instantly share code, notes, and snippets.

@tyrannasaurusbanks
Created May 17, 2016 12:56
Show Gist options
  • Save tyrannasaurusbanks/fad4f5180d56d5cbf66c352ca9cc15be to your computer and use it in GitHub Desktop.
Save tyrannasaurusbanks/fad4f5180d56d5cbf66c352ca9cc15be to your computer and use it in GitHub Desktop.
Quick pseduo code to test flanneld networking between hosts
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