2024-02-16 16:21:18 +01:00
|
|
|
# syntax=docker/dockerfile:latest
|
2024-07-12 10:24:56 +02:00
|
|
|
# From https://github.com/docker-library/redis/blob/master/7.2/alpine/Dockerfile
|
2024-10-08 05:04:09 +00:00
|
|
|
FROM redis:7.2.6-alpine
|
2021-11-30 11:20:42 +01:00
|
|
|
|
2023-06-18 01:46:37 +02:00
|
|
|
COPY --chmod=775 start.sh /start.sh
|
2021-11-30 11:20:42 +01:00
|
|
|
|
2023-05-03 17:10:47 +02:00
|
|
|
RUN set -ex; \
|
2024-04-17 17:52:42 +02:00
|
|
|
apk upgrade --no-cache -a; \
|
2023-05-03 17:10:47 +02:00
|
|
|
apk add --no-cache openssl bash; \
|
2023-05-03 16:36:29 +02:00
|
|
|
\
|
2023-05-03 17:31:43 +02:00
|
|
|
# Give root a random password
|
2024-07-11 18:22:39 +02:00
|
|
|
echo "root:$(openssl rand -base64 12)" | chpasswd; \
|
|
|
|
|
\
|
|
|
|
|
# Get rid of unused binaries
|
2024-07-12 10:36:14 +02:00
|
|
|
rm -f /usr/local/bin/gosu;
|
2021-11-30 11:20:42 +01:00
|
|
|
|
2024-11-06 14:29:18 +01:00
|
|
|
USER 999
|
2023-06-18 01:46:37 +02:00
|
|
|
ENTRYPOINT ["/start.sh"]
|
2022-08-25 15:06:23 +02:00
|
|
|
|
2023-01-30 14:54:09 +01:00
|
|
|
HEALTHCHECK CMD redis-cli -a $REDIS_HOST_PASSWORD PING || exit 1
|
2023-06-26 00:56:08 +02:00
|
|
|
LABEL com.centurylinklabs.watchtower.enable="false"
|