From: W. Trevor King Date: Mon, 30 Dec 2013 21:23:58 +0000 (-0800) Subject: redis/Dockerfile.template: Direct logs to syslog X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=cc0ff1f6cc699bb927fbcc082a99d7b41f16197d;p=dockerfile.git 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. --- 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