#USAGE:
#Make a dockerized syslog container, and pass all logs to this
syslog Container-- Run the syslog container, here all the logs will be gathered, when syslog starts it creates /dev/log which will now be in the mounted host dir /tmp/syslogdev:
docker run --name syslog -d -v /tmp/syslogdev:/dev syslog
Log generating container -- Start one or more containers which generate logs to the rsyslogd:
docker run --name foo -v /tmp/syslogdev/log:/dev/log ubuntu logger hello
(a) Inspection Container -- Tail them logs:
docker run --name seelog --volumes-from syslog ubuntu tail -f /var/log/syslog
(b) Alternatively, as of docker v1.3 use the docker-exec command to inspect syslog container directly docker exec -t syslog tail -f /var/log/syslog
See in the log message from "foo", show up in the "seelog" container.
Content type
Image
Digest
sha256:16315da91…
Size
85.2 MB
Last updated
almost 11 years ago
docker pull compbio/d-syslog