Skip to content

Commit

Permalink
Fix syslog-ng.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
FooBarWidget committed May 12, 2014
1 parent 612b150 commit b56693b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions image/system_services.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b56693b

Please sign in to comment.