Last active
September 15, 2015 17:45
-
-
Save adamreese/a26c58bc510cf24d6728 to your computer and use it in GitHub Desktop.
Check docker ps in all fleet hosts
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
#!/usr/bin/env bash | |
set -e | |
# check for fleetctl in $PATH | |
if ! which fleetctl > /dev/null; then | |
echo 'Please install fleetctl and ensure it is in your $PATH.' | |
exit 1 | |
fi | |
MACHINES=$(fleetctl list-machines -fields machine --full --no-legend) | |
for m in $MACHINES; do | |
#echo "Checking images in ${m}" | |
#fleetctl ssh $m docker images | awk '/deis/' | |
#echo | |
echo "Checking containers in ${m}" | |
fleetctl ssh $m docker ps | awk '/deis/ {print $2}' | |
echo | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment