Last active
November 6, 2017 15:34
-
-
Save arkan/cd8690e33e0485d46196ccb1479f1d8d to your computer and use it in GitHub Desktop.
Docker logs on multiple containers
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
#!/bin/bash | |
# | |
# Usage: | |
# ./docker_logs.sh $(docker ps -q) | |
while [ $# -ne 0 ] | |
do | |
(docker logs -f -t --tail=10 $1|sed -e "s/^/$1: /")& | |
shift | |
done | |
wait |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment