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