Created
December 21, 2016 00:40
-
-
Save sidja/738040125c38ba8984198b7eacca8af3 to your computer and use it in GitHub Desktop.
Handy script to execute in all docker containers at once
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
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