2021-10-03 23:19:00 +00:00
|
|
|
ARG ALPINE_VERSION=3.13.6
|
2023-08-24 14:50:53 +00:00
|
|
|
ARG BASE_IMAGE=gitea.nulo.in/sutty/monit
|
2022-03-07 14:43:14 +00:00
|
|
|
FROM ${BASE_IMAGE}:${ALPINE_VERSION} AS build
|
2024-06-21 15:34:11 +00:00
|
|
|
LABEL org.opencontainers.image.authors="f@sutty.nl"
|
2022-05-02 18:28:36 +00:00
|
|
|
ARG REDIS_VERSION=6.2.7
|
|
|
|
ARG MAX_MEMORY=100mb
|
2023-07-11 13:49:58 +00:00
|
|
|
ENV MAX_MEMORY=${MAX_MEMORY}
|
2019-09-10 23:23:34 +00:00
|
|
|
|
2022-05-02 18:28:36 +00:00
|
|
|
RUN apk add --no-cache redis~${REDIS_VERSION}
|
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 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
|
2020-05-11 15:09:13 +00:00
|
|
|
RUN echo "maxmemory-policy allkeys-lfu" >> /etc/redis.conf
|
2022-03-07 17:24:20 +00:00
|
|
|
RUN echo "maxmemory ${MAX_MEMORY}" >> /etc/redis.conf
|
2022-03-07 17:25:33 +00:00
|
|
|
RUN echo "save \"\"" >> /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}
|
2024-06-21 15:21:51 +00:00
|
|
|
LABEL org.opencontainers.image.authors="f@sutty.nl"
|
2022-05-02 18:28:36 +00:00
|
|
|
ARG REDIS_VERSION=6.2.7
|
2022-03-07 14:43:14 +00:00
|
|
|
|
2022-05-02 18:28:36 +00:00
|
|
|
RUN apk add --no-cache redis~${REDIS_VERSION} su-exec
|
2022-03-07 14:43:14 +00:00
|
|
|
|
|
|
|
COPY --from=build /etc/redis.conf /etc/redis.conf
|
|
|
|
COPY ./monit.conf /etc/monit.d/redis.conf
|
2022-03-15 21:19:12 +00:00
|
|
|
COPY ./redisd.sh /usr/local/bin/redisd
|
2022-03-07 14:43:14 +00:00
|
|
|
|
2019-09-10 23:23:34 +00:00
|
|
|
EXPOSE 6379
|
|
|
|
VOLUME "/var/lib/redis"
|