2022-12-23 21:26:15 +08:00
|
|
|
# From https://github.com/docker-library/redis/blob/master/7.0/alpine/Dockerfile
|
2023-04-18 20:59:40 +08:00
|
|
|
FROM redis:7.0.11-alpine
|
2021-11-30 18:20:42 +08:00
|
|
|
|
2023-05-03 22:36:29 +08:00
|
|
|
COPY --chmod=775 start.sh /usr/bin/start.sh
|
2021-11-30 18:20:42 +08:00
|
|
|
|
2023-05-03 23:10:47 +08:00
|
|
|
RUN set -ex; \
|
|
|
|
apk add --no-cache openssl bash; \
|
2023-05-03 22:36:29 +08:00
|
|
|
\
|
2023-05-03 23:10:38 +08:00
|
|
|
# Give root a random password
|
2023-05-03 22:36:29 +08:00
|
|
|
echo "root:$(openssl rand -base64 12)" | chpasswd
|
2021-11-30 18:20:42 +08:00
|
|
|
|
|
|
|
USER redis
|
|
|
|
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-01-30 22:33:12 +08:00
|
|
|
LABEL com.centurylinklabs.watchtower.monitor-only="true"
|