From ddb5c152b2ad3aceef8eb0a113c24c32ee5a620d Mon Sep 17 00:00:00 2001 From: f Date: Tue, 17 Oct 2023 11:15:24 -0300 Subject: [PATCH] refactor: chown during copy --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7e0c754..791dd88 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,7 +19,7 @@ RUN addgroup nginx ssl COPY ./monit.conf /etc/monit.d/nginx.conf COPY ./prometheusd.sh /usr/local/bin/prometheusd COPY ./access_logd.sh /usr/bin/access_logd -COPY ./nginx /etc/nginx +COPY --chown=nginx:nginx ./nginx /etc/nginx COPY ./access_log.sqlite3 /var/lib/access_log.sqlite3 # Install modules after rewriting /etc/nginx @@ -27,7 +27,6 @@ RUN apk add --no-cache nginx-mod-http-brotli nginx-mod-http-geoip2 # Add support for request_uri parsing if access_log >= 0.3.0 RUN mv /etc/nginx/access_logd_`access_log -v`.conf /etc/nginx/access_logd.conf -RUN chown -R nginx:nginx /etc/nginx RUN nginx -t RUN chown nginx:nginx /var/lib/access_log.sqlite3