diff --git a/Dockerfile b/Dockerfile index 4fe027d..d65a169 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,12 @@ FROM alpine:3.5 MAINTAINER Sebastian Hugentobler -ENV S6_OVERLAY_VERSION=v1.18.1.5 +ENV S6_OVERLAY_VERSION=v1.19.1.1 -RUN apk --no-cache add libressl +RUN apk --no-cache add libressl syslog-ng RUN wget -qO- https://github.com/just-containers/s6-overlay/releases/download/$S6_OVERLAY_VERSION/s6-overlay-amd64.tar.gz | tar -xz -C / RUN apk del libressl +ADD /rootfs / + ENTRYPOINT ["/init"] diff --git a/rootfs/etc/services.d/syslog-ng/run b/rootfs/etc/services.d/syslog-ng/run new file mode 100755 index 0000000..dd9f88a --- /dev/null +++ b/rootfs/etc/services.d/syslog-ng/run @@ -0,0 +1,4 @@ +#!/usr/bin/with-contenv sh + +cd /var +exec syslog-ng --foreground diff --git a/rootfs/etc/syslog-ng/syslog-ng.conf b/rootfs/etc/syslog-ng/syslog-ng.conf new file mode 100644 index 0000000..578aeff --- /dev/null +++ b/rootfs/etc/syslog-ng/syslog-ng.conf @@ -0,0 +1,24 @@ +@version: 3.7 + +options { + stats_freq (0); + time_reopen (10); + chain_hostnames (off); + use_dns (no); + use_fqdn (no); + keep_hostname (yes); +}; + +source s_local { + unix-dgram("/dev/log"); + internal(); +}; + +destination catchall { + pipe("/dev/stdout"); +}; + +log { + source(s_local); + destination(catchall); +};