From cc0ff1f6cc699bb927fbcc082a99d7b41f16197d Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Mon, 30 Dec 2013 13:23:58 -0800 Subject: [PATCH] redis/Dockerfile.template: Direct logs to syslog Since I'm tailing /var/log/messages in CMD. This also makes it easier if you want to redirect the logs to a central syslog server. --- redis/Dockerfile.template | 2 ++ 1 file changed, 2 insertions(+) diff --git a/redis/Dockerfile.template b/redis/Dockerfile.template index 1b3e394..b926fae 100644 --- a/redis/Dockerfile.template +++ b/redis/Dockerfile.template @@ -38,6 +38,8 @@ RUN sed -i 's/need net$/use net/' /etc/init.d/* # A configurable environment variable (e.g. CONFIG_URL) would be nice. # Until then, hardcode the tweaks I need. RUN sed -i 's/\(# maxmemory-policy.*\)/\1\nmaxmemory-policy allkeys-lru/' /etc/redis.conf +RUN sed -i 's/^\(logfile.*\)/# \1/' /etc/redis.conf +RUN sed -i 's/\(# syslog-enabled.*\)/\1\nsyslog-enabled yes/' /etc/redis.conf CMD rc default && tail -F /var/log/messages EXPOSE 6379 -- 2.26.2