mirror of
https://github.com/vimagick/dockerfiles.git
synced 2025-01-12 04:23:04 +02:00
add rsyslog
This commit is contained in:
parent
05e0406a74
commit
fcd4b35ea5
@ -76,6 +76,7 @@ A collection of delicious docker recipes.
|
||||
- [x] redis-arm
|
||||
- [x] rslsync
|
||||
- [x] rsyncd
|
||||
- [x] rsyslog
|
||||
- [x] samba :+1:
|
||||
- [x] samba-arm :+1:
|
||||
- [x] scrapyd :+1:
|
||||
|
25
rsyslog/Dockerfile
Normal file
25
rsyslog/Dockerfile
Normal file
@ -0,0 +1,25 @@
|
||||
#
|
||||
# Dockerfile for rsyslog
|
||||
#
|
||||
|
||||
FROM alpine
|
||||
|
||||
MAINTAINER kev <noreply@easypi.info>
|
||||
|
||||
RUN set -xe \
|
||||
&& apk add --no-cache rsyslog \
|
||||
&& sed -i '/imklog/s/^/#/' /etc/rsyslog.conf \
|
||||
&& { \
|
||||
echo '###Syslog Server####'; \
|
||||
echo 'module(load="imtcp")'; \
|
||||
echo 'module(load="imudp")'; \
|
||||
echo 'input(type="imtcp" port="514")'; \
|
||||
echo 'input(type="imudp" port="514")'; \
|
||||
} >> /etc/rsyslog.conf
|
||||
|
||||
VOLUME /var/log
|
||||
|
||||
EXPOSE 514/tcp \
|
||||
514/udp
|
||||
|
||||
ENTRYPOINT ["rsyslogd", "-n"]
|
25
rsyslog/README.md
Normal file
25
rsyslog/README.md
Normal file
@ -0,0 +1,25 @@
|
||||
rsyslog
|
||||
=======
|
||||
|
||||
## docker-compose.yml
|
||||
|
||||
```yaml
|
||||
rsyslog:
|
||||
image: vimagick/rsyslog
|
||||
ports:
|
||||
- "514:514/tcp"
|
||||
- "514:514/udp"
|
||||
volumes:
|
||||
- ./log:/var/log
|
||||
restart: always
|
||||
```
|
||||
|
||||
## Up and Running
|
||||
|
||||
```bash
|
||||
$ docker-compose up -d
|
||||
$ docker-compose exec rsyslog sh
|
||||
>>> logger -t debug hello world
|
||||
>>> tail /var/log/messages
|
||||
2016-10-29T07:52:15.177918+00:00 c88f52cf86b6 debug: hello world
|
||||
```
|
8
rsyslog/docker-compose.yml
Normal file
8
rsyslog/docker-compose.yml
Normal file
@ -0,0 +1,8 @@
|
||||
rsyslog:
|
||||
image: vimagick/rsyslog
|
||||
ports:
|
||||
- "514:514/tcp"
|
||||
- "514:514/udp"
|
||||
volumes:
|
||||
- ./log:/var/log
|
||||
restart: always
|
Loading…
Reference in New Issue
Block a user