Giter VIP home page Giter VIP logo

docker-rsyslog's Introduction

rsyslog in a container

Project URL: https://github.com/jumanjihouse/docker-rsyslog
Registry: https://registry.hub.docker.com/u/jumanjiman/rsyslog/

Download size  Version  Source code  Docker Registry  Circle CI

Overview

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.

How-to

Fetch an already-built image

The runtime image is published as jumanjiman/rsyslog.

docker pull jumanjiman/rsyslog

Run

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

Use systemd for automatic startup

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

Build

On a docker host, run:

ci/build
ci/test

Publish to a private registry

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

Contribute

See CONTRIBUTING.md in this repo.

Other rsyslog images

License

See LICENSE in this repo.

docker-rsyslog's People

Contributors

jumanjiman avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.