Skip to content

Instantly share code, notes, and snippets.

View henrymazza's full-sized avatar

Fabio Mazarotto henrymazza

View GitHub Profile
@henrymazza
henrymazza / docker-exec-all
Last active March 28, 2021 04:08 — forked from timhodson/runCommandAllDockers.sh
Run a command on all docker containers
#!/bin/sh
if [ $# -eq 0 ]; then
echo "No arguments provided"
exit 1
fi
for container in `docker ps -q`; do
# show the name of the container
printf '%-40s' $(docker inspect --format='{{.Name}}' $container)