Created
September 3, 2014 02:54
-
-
Save sbward/b4cd7259dd10e0971621 to your computer and use it in GitHub Desktop.
This file contains hidden or 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/bash | |
touch kill.me | |
for i in {0..10000} | |
do | |
container_name=$RANDOM-$i | |
echo $container_name | |
if [ ! -f kill.me ]; then | |
echo "Exiting..." | |
exit 0 | |
fi | |
sudo docker run --name=$container_name -m='300M' -c 51 -i -a=stdout -a=stderr ruby ruby -e 'File.open("big.file","w") {|f| f.write("0" * 99999) }' | |
sudo docker stop -t=5 $container_name | |
sudo docker rm -f $container_name | |
echo item: $i | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment