From b56693beb345781092f294c209cba49ace355dd7 Mon Sep 17 00:00:00 2001 From: "Hongli Lai (Phusion)" Date: Mon, 12 May 2014 17:29:45 +0200 Subject: [PATCH] Fix syslog-ng. The system() source in the default syslog-ng config file does not work in Docker because it tries to access /proc/kmsg, which is not allowed due to Docker's privileges. We replace it by a source that only reads from /dev/log. --- image/system_services.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/image/system_services.sh b/image/system_services.sh index af3f5e5da..7947ad4aa 100755 --- a/image/system_services.sh +++ b/image/system_services.sh @@ -21,6 +21,9 @@ mkdir /etc/service/syslog-ng cp /build/runit/syslog-ng /etc/service/syslog-ng/run mkdir -p /var/lib/syslog-ng cp /build/config/syslog_ng_default /etc/default/syslog-ng +# Replace the system() source because inside Docker we +# can't access /proc/kmsg. +sed -i -E 's/^(\s*)system\(\);/\1unix-stream("\/dev\/log");/' /etc/syslog-ng/syslog-ng.conf ## Install logrotate. $minimal_apt_get_install logrotate