Change redis conf: listen on unix socket (#66)

By default, redis-server is listening on localhost TCP port. This
change will make it also listen to the domain socket (unix socket),
which will have better client-server performance.
This commit is contained in:
Qi Luo 2016-11-12 01:14:41 +00:00 committed by Shuotian Cheng
parent f8524e74f5
commit 21c8322055

View File

@ -10,8 +10,10 @@ RUN apt-get update &&
dpkg_apt /deps/redis-server_*.deb && \
apt-get clean -y && apt-get autoclean -y && apt-get autoremove -y
RUN sed -ri 's/^daemonize yes$/daemonize no/' /etc/redis/redis.conf \
&& sed -ri 's/^logfile .*$/logfile ""/' /etc/redis/redis.conf \
&& sed -ri 's/^# syslog-enabled no$/syslog-enabled no/' /etc/redis/redis.conf
RUN sed -ri 's/^daemonize yes$/daemonize no/; \
s/^logfile .*$/logfile ""/; \
s/^# syslog-enabled no$/syslog-enabled no/; \
s/^# unixsocket/unixsocket/ \
' /etc/redis/redis.conf
ENTRYPOINT service redis-server start