-
Notifications
You must be signed in to change notification settings - Fork 140
/
Dockerfile
24 lines (19 loc) · 868 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM ubuntu:bionic-20190612
LABEL maintainer="[email protected]"
ENV REDIS_VERSION=4.0.9 \
REDIS_USER=redis \
REDIS_DATA_DIR=/var/lib/redis \
REDIS_LOG_DIR=/var/log/redis
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y redis-server=5:${REDIS_VERSION}* \
&& sed 's/^bind /# bind /' -i /etc/redis/redis.conf \
&& sed 's/^logfile /# logfile /' -i /etc/redis/redis.conf \
&& sed 's/^daemonize yes/daemonize no/' -i /etc/redis/redis.conf \
&& sed 's/^protected-mode yes/protected-mode no/' -i /etc/redis/redis.conf \
&& sed 's/^# unixsocket /unixsocket /' -i /etc/redis/redis.conf \
&& sed 's/^# unixsocketperm 700/unixsocketperm 777/' -i /etc/redis/redis.conf \
&& rm -rf /var/lib/apt/lists/*
COPY entrypoint.sh /sbin/entrypoint.sh
RUN chmod 755 /sbin/entrypoint.sh
EXPOSE 6379/tcp
ENTRYPOINT ["/sbin/entrypoint.sh"]