From f71d43e965471617e7db190febcb782cfb34e69e Mon Sep 17 00:00:00 2001 From: Ernesto Serrano Date: Sun, 8 Sep 2024 10:54:50 +0100 Subject: [PATCH 1/3] Fix chown command to use colon for user and group separation --- Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index da88734a7..2dfa0947b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -59,9 +59,8 @@ RUN apk --no-cache add \ # Remove default server definition && rm /etc/nginx/http.d/default.conf \ # Make sure files/folders needed by the processes are accessable when they run under the nobody user - && chown -R nobody.nobody /run \ - && chown -R nobody.nobody /var/lib/nginx \ - && chown -R nobody.nobody /var/log/nginx + && chown -R nobody:nobody /var/www/html /run /var/lib/nginx /var/log/nginx + # Add configuration files COPY --chown=nobody rootfs/ / From 718cdd8efed052b967e7ca7a5dd94fc550233cf8 Mon Sep 17 00:00:00 2001 From: Ernesto Serrano Date: Sun, 8 Sep 2024 10:59:36 +0100 Subject: [PATCH 2/3] Fix chown command to use colon for user and group separation --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2dfa0947b..651dda349 100644 --- a/Dockerfile +++ b/Dockerfile @@ -59,7 +59,10 @@ RUN apk --no-cache add \ # Remove default server definition && rm /etc/nginx/http.d/default.conf \ # Make sure files/folders needed by the processes are accessable when they run under the nobody user - && chown -R nobody:nobody /var/www/html /run /var/lib/nginx /var/log/nginx + && chown -R nobody:nobody /run \ + && chown -R nobody:nobody /var/lib/nginx \ + && chown -R nobody:nobody /var/www/html \ + && chown -R nobody:nobody /var/log/nginx # Add configuration files From 90ac6bf75d62951b407d5c822b72316c8a3b59a8 Mon Sep 17 00:00:00 2001 From: Ernesto Serrano Date: Sun, 8 Sep 2024 11:02:43 +0100 Subject: [PATCH 3/3] Fix chown command to use colon for user and group separation --- Dockerfile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 651dda349..88e05f531 100644 --- a/Dockerfile +++ b/Dockerfile @@ -59,11 +59,8 @@ RUN apk --no-cache add \ # Remove default server definition && rm /etc/nginx/http.d/default.conf \ # Make sure files/folders needed by the processes are accessable when they run under the nobody user - && chown -R nobody:nobody /run \ - && chown -R nobody:nobody /var/lib/nginx \ - && chown -R nobody:nobody /var/www/html \ - && chown -R nobody:nobody /var/log/nginx - + && mkdir -p /run /var/lib/nginx /var/www/html /var/log/nginx \ + && chown -R nobody:nobody /run /var/lib/nginx /var/www/html /var/log/nginx # Add configuration files COPY --chown=nobody rootfs/ /