From 3f44d37f8fb5b47b65b42deb90dfb881013c0587 Mon Sep 17 00:00:00 2001 From: James Brumond Date: Sat, 19 Aug 2023 13:40:47 -0700 Subject: [PATCH] update file ownership in container --- Dockerfile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4f7c0ce..a21979b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,10 +16,9 @@ FROM nginx:${NGINX_VERSION} AS deploy_stage EXPOSE 80 # copy actual web content built above -COPY --from=build_stage /workspace/www/ /usr/share/nginx/html -RUN chmod -R +rX /usr/share/nginx/html +COPY --from=build_stage --chown=nginx:nginx /workspace/www/ /usr/share/nginx/html # nginx config files -COPY conf/nginx.conf /etc/nginx/nginx.conf -COPY conf/default.conf /etc/nginx/conf.d/default.conf -COPY conf/mime.types /etc/nginx/mime.types +COPY --chown=nginx:nginx conf/nginx.conf /etc/nginx/nginx.conf +COPY --chown=nginx:nginx conf/default.conf /etc/nginx/conf.d/default.conf +COPY --chown=nginx:nginx conf/mime.types /etc/nginx/mime.types