From 593dfe444a5a23958cf7e8afdc9ba2826dab14f8 Mon Sep 17 00:00:00 2001 From: Revant Nandgaonkar Date: Fri, 19 Nov 2021 20:41:23 +0530 Subject: [PATCH 1/2] ci: fix erpnext build --- build/erpnext-nginx/Dockerfile | 2 +- build/frappe-nginx/Dockerfile | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/build/erpnext-nginx/Dockerfile b/build/erpnext-nginx/Dockerfile index 22d356e4..69e2614f 100644 --- a/build/erpnext-nginx/Dockerfile +++ b/build/erpnext-nginx/Dockerfile @@ -24,7 +24,7 @@ RUN chmod +x /install_app \ FROM ${DOCKER_REGISTRY_PREFIX}/frappe-nginx:${IMAGE_TAG} -COPY --from=builder /home/frappe/frappe-bench/sites/ /var/www/html/ +COPY --from=builder --chown=1000:1000 /home/frappe/frappe-bench/sites/ /var/www/html/ COPY --from=builder /rsync /rsync RUN echo "erpnext" >> /var/www/html/apps.txt diff --git a/build/frappe-nginx/Dockerfile b/build/frappe-nginx/Dockerfile index 69783c9f..f5609021 100644 --- a/build/frappe-nginx/Dockerfile +++ b/build/frappe-nginx/Dockerfile @@ -47,15 +47,15 @@ RUN cp -R apps/frappe/frappe/public/* sites/assets/frappe \ FROM nginxinc/nginx-unprivileged:latest -COPY --from=builder /home/frappe/frappe-bench/sites /var/www/html/ -COPY --from=builder /var/www/error_pages /var/www/ -COPY build/frappe-nginx/nginx-default.conf.template /etc/nginx/conf.d/default.conf.template -COPY build/frappe-nginx/docker-entrypoint.sh / - USER root RUN usermod -u 1000 nginx && groupmod -g 1000 nginx +COPY --from=builder --chown=1000:1000 /home/frappe/frappe-bench/sites /var/www/html/ +COPY --from=builder --chown=1000:1000 /var/www/error_pages /var/www/ +COPY build/frappe-nginx/nginx-default.conf.template /etc/nginx/conf.d/default.conf.template +COPY build/frappe-nginx/docker-entrypoint.sh / + RUN apt-get update \ && apt-get install --no-install-recommends -y \ rsync \ From 9bfb3abde495d354d6745aeece72e8ebcf37d593 Mon Sep 17 00:00:00 2001 From: Revant Nandgaonkar Date: Fri, 19 Nov 2021 22:02:50 +0530 Subject: [PATCH 2/2] ci: fix erpnext nginx build permissions --- build/frappe-nginx/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/frappe-nginx/Dockerfile b/build/frappe-nginx/Dockerfile index f5609021..d1c9f635 100644 --- a/build/frappe-nginx/Dockerfile +++ b/build/frappe-nginx/Dockerfile @@ -67,7 +67,7 @@ RUN echo "#!/bin/bash" > /rsync \ RUN mkdir /assets VOLUME [ "/assets" ] -RUN chown -R nginx:nginx /assets /etc/nginx/conf.d/ +RUN chown -R nginx:nginx /assets /etc/nginx/conf.d/ /var/www/html/ USER nginx