sonic-buildimage/dockers/docker-database/Dockerfile
Qi Luo 21c8322055 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.
2016-11-14 11:29:31 -08:00

20 lines
986 B
Docker
Executable File

FROM docker-base
COPY ["deps/redis-tools_*.deb", "deps/redis-server_*.deb", "/deps/"]
## Install packages
## Clean up
RUN apt-get update && \
dpkg_apt() { [ -f $1 ] && { dpkg -i $1 || apt-get -y install -f; } || return 1; }; \
dpkg_apt /deps/redis-tools_*.deb && \
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/; \
s/^logfile .*$/logfile ""/; \
s/^# syslog-enabled no$/syslog-enabled no/; \
s/^# unixsocket/unixsocket/ \
' /etc/redis/redis.conf
ENTRYPOINT service redis-server start