Created
March 25, 2020 13:22
-
-
Save fty4/a6d43becf9c26d6a8dbfff260b46f721 to your computer and use it in GitHub Desktop.
run command on every container - e.g. date and get its output
This file contains hidden or 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
# run command on every container | |
for container in `docker ps --format '{{.Names}}'`; do printf "$container\t$(docker exec $container date)\n"; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment