From b254e018e54a281c53c6a49ec83e2c9bc79700cc Mon Sep 17 00:00:00 2001 From: chabad360 Date: Thu, 5 Mar 2020 02:28:42 +0000 Subject: [PATCH] shave off a layer --- build/erpnext-assets/Dockerfile | 5 ++--- build/erpnext-assets/install_app.sh | 4 +++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/build/erpnext-assets/Dockerfile b/build/erpnext-assets/Dockerfile index 9e966d53..8ea44946 100644 --- a/build/erpnext-assets/Dockerfile +++ b/build/erpnext-assets/Dockerfile @@ -5,11 +5,10 @@ COPY build/erpnext-assets/install_app.sh /install_app RUN /install_app erpnext https://github.com/frappe/erpnext FROM frappe/frappe-assets:develop -RUN cp /home/frappe/frappe-bench/sites/apps.txt /home/frappe/frappe-bench/sites/apps.bak + COPY --from=0 /home/frappe/frappe-bench/sites/ /var/www/html/ COPY --from=0 /rsync /rsync -RUN mv /home/frappe/frappe-bench/sites/apps.bak /home/frappe/frappe-bench/sites/apps.txt \ - && echo -n "\nerpnext" >> /home/frappe/frappe-bench/sites/apps.txt +RUN echo -n "\nerpnext" >> /var/www/html/apps.txt VOLUME [ "/assets" ] diff --git a/build/erpnext-assets/install_app.sh b/build/erpnext-assets/install_app.sh index dd05d228..aa3cd98c 100644 --- a/build/erpnext-assets/install_app.sh +++ b/build/erpnext-assets/install_app.sh @@ -27,4 +27,6 @@ yarn install --production=true mkdir -p /home/frappe/frappe-bench/sites/assets/${APP_NAME} cp -R /home/frappe/frappe-bench/apps/${APP_NAME}/${APP_NAME}/public/* /home/frappe/frappe-bench/sites/assets/${APP_NAME} -echo "rsync -a --delete /var/www/html/assets/${APP_NAME} /assets" > /rsync \ No newline at end of file +echo "rsync -a --delete /var/www/html/assets/${APP_NAME} /assets" > /rsync + +rm /home/frappe/frappe-bench/sites/apps.txt \ No newline at end of file