From 3cbab7113485b3671ca18e0f85475570592dd4cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A1s=20Gazdag?= Date: Fri, 22 Sep 2023 13:13:22 +0200 Subject: [PATCH] Fix redis-sentinel entrypoint & /etc/redis permissions (#45) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Gazdag András Co-authored-by: Gazdag András --- Dockerfile | 5 ++++- Dockerfile.sentinel | 6 +++++- entrypoint-sentinel.sh | 2 ++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8297dda..ea7c3e1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -45,7 +45,10 @@ RUN chown -R 1000:0 /etc/redis && \ chmod -R g+rw /etc/redis && \ mkdir /data && \ chown -R 1000:0 /data && \ - chmod -R g+rw /data + chmod -R g+rw /data && \ + mkdir /node-conf && \ + chown -R 1000:0 /node-conf && \ + chmod -R g+rw /node-conf VOLUME ["/data"] diff --git a/Dockerfile.sentinel b/Dockerfile.sentinel index c415a8a..1c34cfa 100644 --- a/Dockerfile.sentinel +++ b/Dockerfile.sentinel @@ -36,7 +36,11 @@ COPY entrypoint-sentinel.sh /usr/bin/entrypoint-sentinel.sh COPY healthcheck-Sentinel.sh /usr/bin/healthcheck.sh -RUN chown -R redis:redis /etc/redis +RUN chown -R 1000:0 /etc/redis && \ + chmod -R g+rw /etc/redis && \ + mkdir /sentinel-data && \ + chown -R 1000:0 /sentinel-data && \ + chmod -R g+rw /sentinel-data VOLUME ["/sentinel-data"] diff --git a/entrypoint-sentinel.sh b/entrypoint-sentinel.sh index e1b6c37..efa5f7e 100755 --- a/entrypoint-sentinel.sh +++ b/entrypoint-sentinel.sh @@ -89,3 +89,5 @@ main_function() { fi start_sentinel } + +main_function