2016-10-29 10:12:00 +02:00
|
|
|
#
|
|
|
|
# Dockerfile for rsyslog
|
|
|
|
#
|
|
|
|
|
|
|
|
FROM alpine
|
2017-05-08 01:05:07 +02:00
|
|
|
MAINTAINER kev <noreply@easypi.pro>
|
2016-10-29 10:12:00 +02:00
|
|
|
|
|
|
|
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
|
2016-10-29 10:22:21 +02:00
|
|
|
WORKDIR /var/log
|
2016-10-29 10:12:00 +02:00
|
|
|
|
|
|
|
EXPOSE 514/tcp \
|
|
|
|
514/udp
|
|
|
|
|
|
|
|
ENTRYPOINT ["rsyslogd", "-n"]
|