Created
March 14, 2017 08:56
-
-
Save svenhornberg/9b36e788a94acc5ac57891c3332927ed to your computer and use it in GitHub Desktop.
zalenium kill after a hour
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
#!/bin/bash | |
while : | |
do | |
echo "checking for idle container" | |
docker ps --format '{{.ID}}\t{{.Image}}\t{{.Status}}\t{{.RunningFor}}' -f name='zalenium_' | grep -i hour | cut -f 1 | xargs docker stop | |
sleep 600 #10 min | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment