From c47a35d642828c30dbd546d1d6160718d3e135c7 Mon Sep 17 00:00:00 2001 From: Daniel Volz Date: Sat, 14 Feb 2026 21:12:51 +0100 Subject: [PATCH] fix: use COPY --chmod instead of RUN chmod in frontend Dockerfile (#214) The nginx-unprivileged base image runs as non-root, so RUN chmod on / fails with 'Operation not permitted'. Use COPY --chmod=755 to set the executable bit at build time instead. --- frontend/Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/Dockerfile b/frontend/Dockerfile index edf2be7..68a4a6c 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -42,8 +42,7 @@ RUN sed -i 's|include /etc/nginx/conf.d/\*.conf;|include /tmp/default.conf;|' /e COPY nginx.conf /etc/nginx/templates/default.conf.template # Copy entrypoint wrapper (translates LOG_LEVEL → nginx access log control) -COPY nginx-entrypoint.sh /nginx-entrypoint.sh -RUN chmod +x /nginx-entrypoint.sh +COPY --chmod=755 nginx-entrypoint.sh /nginx-entrypoint.sh # Copy built static files with correct ownership (nginx user = uid 101) COPY --from=builder --chown=101:101 /app/dist /usr/share/nginx/html