From 83f7db0c50f53b628031050e00759624bbe2521a Mon Sep 17 00:00:00 2001 From: Babuuu <59009890+Meradoch@users.noreply.github.com> Date: Mon, 24 Oct 2022 15:22:22 +0300 Subject: [PATCH] Use docker --chown command instead of RUN chown (#979) The `RUN chown -R frappe:frappe /home/frappe` command was taking too long for me, over 6 minutes before I gave up and killed it. docker chown is faster, and it helps avoid creating a new layer. --- images/worker/Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/images/worker/Dockerfile b/images/worker/Dockerfile index 76e281d6..d07965fc 100644 --- a/images/worker/Dockerfile +++ b/images/worker/Dockerfile @@ -138,9 +138,9 @@ USER frappe # Split frappe and erpnext to reduce image size (because of frappe-bench/env/ directory) FROM configured_base as erpnext -COPY --from=erpnext_builder /home/frappe/frappe-bench/apps /home/frappe/frappe-bench/apps -COPY --from=erpnext_builder /home/frappe/frappe-bench/env /home/frappe/frappe-bench/env -COPY --from=erpnext_builder /home/frappe/frappe-bench/sites/apps.txt /home/frappe/frappe-bench/sites/ -RUN chown -R frappe:frappe /home/frappe +COPY --from=erpnext_builder --chown=frappe:frappe /home/frappe/frappe-bench/apps /home/frappe/frappe-bench/apps +COPY --from=erpnext_builder --chown=frappe:frappe /home/frappe/frappe-bench/env /home/frappe/frappe-bench/env +COPY --from=erpnext_builder --chown=frappe:frappe /home/frappe/frappe-bench/sites/apps.txt /home/frappe/frappe-bench/sites/ + USER frappe