refactor: chown during copy

This commit is contained in:
f 2023-10-17 11:15:24 -03:00
parent 22ab55417e
commit ddb5c152b2
No known key found for this signature in database

View file

@ -19,7 +19,7 @@ RUN addgroup nginx ssl
COPY ./monit.conf /etc/monit.d/nginx.conf COPY ./monit.conf /etc/monit.d/nginx.conf
COPY ./prometheusd.sh /usr/local/bin/prometheusd COPY ./prometheusd.sh /usr/local/bin/prometheusd
COPY ./access_logd.sh /usr/bin/access_logd 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 COPY ./access_log.sqlite3 /var/lib/access_log.sqlite3
# Install modules after rewriting /etc/nginx # 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 # 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 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 nginx -t
RUN chown nginx:nginx /var/lib/access_log.sqlite3 RUN chown nginx:nginx /var/lib/access_log.sqlite3