Skip to content

Commit

Permalink
Change redis conf: listen on unix socket (#66)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
qiluo-msft committed Nov 17, 2016
1 parent 0500be6 commit aadb1ef
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions dockers/docker-database/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit aadb1ef

Please sign in to comment.