containers-redis/Dockerfile

31 lines
959 B
Text
Raw Normal View History

2021-10-03 23:19:00 +00:00
ARG ALPINE_VERSION=3.13.6
ARG BASE_IMAGE=sutty/monit
2022-03-07 14:43:14 +00:00
FROM ${BASE_IMAGE}:${ALPINE_VERSION} AS build
2019-09-10 23:10:18 +00:00
MAINTAINER "f <f@sutty.nl>"
2019-09-10 23:23:34 +00:00
RUN apk add --no-cache redis
2019-09-10 23:23:34 +00:00
RUN sed -re "/^bind /d" -i /etc/redis.conf
RUN sed -re "/^protected-mode /d" -i /etc/redis.conf
RUN sed -re "/^logfile /d" -i /etc/redis.conf
RUN sed -re "s/^# (syslog-enabled).*/\1 yes/" -i /etc/redis.conf
RUN sed -re "s/^(appendonly).*/\1 yes/" -i /etc/redis.conf
RUN echo "pidfile /run/redis/redis.pid" >> /etc/redis.conf
RUN echo "daemonize yes" >> /etc/redis.conf
2019-09-18 00:58:31 +00:00
RUN echo "protected-mode no" >> /etc/redis.conf
RUN echo "maxmemory-policy allkeys-lfu" >> /etc/redis.conf
2021-02-02 23:53:02 +00:00
RUN echo "maxmemory 100mb" >> /etc/redis.conf
2019-09-10 23:23:34 +00:00
2022-03-07 14:43:14 +00:00
ARG ALPINE_VERSION=3.13.6
ARG BASE_IMAGE=sutty/monit
FROM ${BASE_IMAGE}:${ALPINE_VERSION}
MAINTAINER "f <f@sutty.nl>"
RUN apk add --no-cache redis
COPY --from=build /etc/redis.conf /etc/redis.conf
COPY ./monit.conf /etc/monit.d/redis.conf
2019-09-10 23:23:34 +00:00
EXPOSE 6379
VOLUME "/var/lib/redis"