Project URL: https://github.com/jumanjihouse/docker-rsyslog
Registry: https://registry.hub.docker.com/u/jumanjiman/rsyslog/
Table of Contents
This source is used to build an image for rsyslog. The image contains:
- rsyslog-x86_64
- default, minimal configuration that you can easily override
The runtime image is quite small (roughly 8 MB) since it is based on the alpine docker image, which is based on Alpine Linux.
I use this image in combination with
logspout
to forward log messages from containers to a central syslog server.
If a particular docker container only logs to syslog,
this rsyslog container provides a way to copy the log messages to
docker logs
, which gets picked up by logspout.
The runtime image is published as jumanjiman/rsyslog
.
docker pull jumanjiman/rsyslog
Run a container from the CLI:
docker run -d \
--name rsyslog.service \
-h $(hostname) \
jumanjiman/rsyslog
Run a container that only logs to syslog:
docker run -d \
--name tftp \
-h tftp.example.com \
--volumes-from rsyslog.service \
jumanjiman/tftp-hpa
Now you can tail the logs from the tftp container:
docker logs -f rsyslog.service
Review and potentially modify the sample systemd unit file at
systemd/rsyslog.service
, then run:
sudo cp systemd/rsyslog.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl start rsyslog
sudo systemctl enable rsyslog
On a docker host, run:
ci/build
ci/tag
ci/test
You can push the built image to a private docker registry:
docker tag rsyslog registry_id/your_id/rsyslog
docker push registry_id/your_id/rsyslog
See CONTRIBUTING.md
in this repo.
See LICENSE
in this repo.