Skip to content

Instantly share code, notes, and snippets.

@mustafaakin
Created October 28, 2016 22:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mustafaakin/9777ce500c31a7f8899cf18b9d7aac6f to your computer and use it in GitHub Desktop.
Save mustafaakin/9777ce500c31a7f8899cf18b9d7aac6f to your computer and use it in GitHub Desktop.
docker run --name iperf_host -d -ti --net host \
--env="constraint:node==mhs-demo0-do" \
mustafaakin/alpine-iperf iperf -s
# Wait a little
sleep 1
for run in {1..5}; do
docker run --net host --env="constraint:node==mhs-demo1-do" -ti \
mustafaakin/alpine-iperf \
iperf -c $(docker-machine ip mhs-demo0-do) -P 10 | grep SUM
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment