From ab731325539bfc8182502b3def8d8b1424cb0201 Mon Sep 17 00:00:00 2001 From: MrMeeb Date: Sat, 27 May 2023 21:58:31 +0000 Subject: [PATCH] set permissions to 1000 at build --- Dockerfile | 3 ++- root/container-init.sh | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index d9fb0e2..947b202 100644 --- a/Dockerfile +++ b/Dockerfile @@ -52,7 +52,8 @@ RUN npm install && \ COPY root/ / RUN chmod +x /cronicle-prepare.sh && \ - chmod +x /container-init.sh + chmod +x /container-init.sh && \ + chown -R ${PUID}:${PGID} /app /config EXPOSE 3012 diff --git a/root/container-init.sh b/root/container-init.sh index ff45c08..394615d 100644 --- a/root/container-init.sh +++ b/root/container-init.sh @@ -38,16 +38,16 @@ else exit 1 fi -echo "Checking permissions in /config and /app (this can take some time)." +echo "Checking permissions in /config and /app." if [ ! "$(stat -c %u /app)" -eq "${PUID}" ] || [ ! "$(stat -c %g /app)" -eq "${PGID}" ] then - echo "Fixing permissions for /app." + echo "Fixing permissions for /app (this can take some time)." chown -R cronicle:cronicle /app fi if [ ! "$(stat -c %u /config)" -eq "${PUID}" ] || [ ! "$(stat -c %g /config)" -eq "${PGID}" ] then - echo "Fixing permissions for /config." + echo "Fixing permissions for /config (this can take some time)." chown -R cronicle:cronicle /config fi \ No newline at end of file