From 470d7bc645e6e158b48b4dffd9a9dd5dde9f9818 Mon Sep 17 00:00:00 2001 From: Brad Durrow Date: Mon, 19 Jul 2021 00:37:51 -0600 Subject: [PATCH] Fix: Add group write perms to /etc/redis (#4) * Fix: Add group write perms to /etc/redis By default OpenShift runs as a non-root user but the GID is always 0. To allow `entrypoint.sh` to configure redis at container start, we need to change the permissions so that GID 0 users can modify `/etc/redis` and it's contents. Signed-off-by: Brad Durrow * Add /opt/redis with g+rwX for Openshift Signed-off-by: Brad Durrow --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index 00e3963..fb97bd6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,6 +32,9 @@ COPY setupMasterSlave.sh /usr/bin/setupMasterSlave.sh COPY healthcheck.sh /usr/bin/healthcheck.sh +RUN mkdir -p /opt/redis/ && \ + chmod -R g+rwX /etc/redis /opt/redis + VOLUME ["/data"] WORKDIR /data -- 2.26.0