Build the syslog container:
docker build -t syslog .
Run it (replace logging.example.com with the fqdn of your central syslog server):
docker run -e "SYSLOG_SERVER=logging.example.com" --name syslog -d -v /tmp/syslogdev:/dev syslog
Start another container to send logs:
docker run -v /tmp/syslogdev/log:/dev/log ubuntu logger hello
Use the docker-exec command to inspect syslog container directly, after some logs have been generated
docker exec -t syslog tail -f /var/log/syslog
See in the log message show up in the "tail" container.
LOGGLY_HOST - get from logglyLOGGLY_API_KEY - get from logglyLOGGLY_TAG - e.g., production, staging, docker-eastFor more information on this approach, see Multiple Docker containers logging to a single syslog.
Content type
Image
Digest
sha256:82eebdbb3…
Size
82.5 MB
Last updated
almost 11 years ago
docker pull roverdotcom/syslog