Skip to content

Instantly share code, notes, and snippets.

@sbward
Created September 3, 2014 02:54
Show Gist options
  • Save sbward/b4cd7259dd10e0971621 to your computer and use it in GitHub Desktop.
Save sbward/b4cd7259dd10e0971621 to your computer and use it in GitHub Desktop.
#!/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