1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-27 01:08:37 +00:00

update rsyslog

This commit is contained in:
kev 2016-10-29 16:22:21 +08:00
parent fcd4b35ea5
commit ebe080bd1f
2 changed files with 17 additions and 4 deletions

@ -3,7 +3,6 @@
# #
FROM alpine FROM alpine
MAINTAINER kev <noreply@easypi.info> MAINTAINER kev <noreply@easypi.info>
RUN set -xe \ RUN set -xe \
@ -18,6 +17,7 @@ RUN set -xe \
} >> /etc/rsyslog.conf } >> /etc/rsyslog.conf
VOLUME /var/log VOLUME /var/log
WORKDIR /var/log
EXPOSE 514/tcp \ EXPOSE 514/tcp \
514/udp 514/udp

@ -1,6 +1,8 @@
rsyslog rsyslog
======= =======
[RSYSLOG][1] is the rocket-fast system for log processing.
## docker-compose.yml ## docker-compose.yml
```yaml ```yaml
@ -18,8 +20,19 @@ rsyslog:
```bash ```bash
$ docker-compose up -d $ docker-compose up -d
$ docker-compose exec rsyslog sh $ docker-compose exec rsyslog sh
>>> logger -t debug hello world >>> pwd
>>> tail /var/log/messages /var/log
2016-10-29T07:52:15.177918+00:00 c88f52cf86b6 debug: hello world >>> touch maillog
>>> tail -f /var/log/maillog
2016-10-29T08:17:34+00:00 172.17.0.1 root: hello
2016-10-29T08:17:41+00:00 172.17.0.1 root: world
^C
>>> exit
$ logger -n localhost -p mail.debug hello
$ logger -n localhost -p mail.info world
``` ```
[1]: http://www.rsyslog.com/