Skip to content

Instantly share code, notes, and snippets.

@skyrocknroll
Created July 12, 2018 17:53
Show Gist options
  • Save skyrocknroll/e7dec56cb4fc8cd71c35dde93c90394e to your computer and use it in GitHub Desktop.
Save skyrocknroll/e7dec56cb4fc8cd71c35dde93c90394e to your computer and use it in GitHub Desktop.
docker nomad exec all containers
#!/bin/bash
containers=$(docker ps -q)
for item in $containers
do
echo $item
echo $1
docker exec $item netstat -tapln | grep :26379 | wc -l
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment