Merge pull request #2499 from nextcloud/redis-dockerfile

optimize redis Dockerfile
This commit is contained in:
Simon L 2023-05-03 17:32:24 +02:00 committed by GitHub
commit 412da74702
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,13 +1,13 @@
# From https://github.com/docker-library/redis/blob/master/7.0/alpine/Dockerfile
FROM redis:7.0.11-alpine
RUN apk add --no-cache openssl bash
COPY start.sh /usr/bin/
RUN chmod +x /usr/bin/start.sh
COPY --chmod=775 start.sh /usr/bin/start.sh
RUN set -ex; \
apk add --no-cache openssl bash; \
\
# Give root a random password
RUN echo "root:$(openssl rand -base64 12)" | chpasswd
echo "root:$(openssl rand -base64 12)" | chpasswd
USER redis
ENTRYPOINT ["start.sh"]