Skip to content

Instantly share code, notes, and snippets.

@sidja
Created December 21, 2016 00:40
Show Gist options
  • Save sidja/738040125c38ba8984198b7eacca8af3 to your computer and use it in GitHub Desktop.
Save sidja/738040125c38ba8984198b7eacca8af3 to your computer and use it in GitHub Desktop.
Handy script to execute in all docker containers at once
function docker_exe {
d=($(docker ps | grep -v fluentd | grep -v nginx | grep befit | awk '{print $1}'))
for m in ${d[@]}
do
docker exec -it $m $1
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment