From 799aa4e561e7ee106bb92db58fb3ce9061f7999c Mon Sep 17 00:00:00 2001 From: dandax123 Date: Fri, 1 May 2026 06:45:27 +0200 Subject: [PATCH] fix: embed entrypoint for layered image --- images/layered/Containerfile | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/images/layered/Containerfile b/images/layered/Containerfile index 7482280c..cf10c2cc 100644 --- a/images/layered/Containerfile +++ b/images/layered/Containerfile @@ -46,8 +46,21 @@ VOLUME [ \ USER root # This entrypoint script link build assets of the image to the mounted sites volume at container initialization -COPY resources/core/main-entrypoint.sh /usr/local/bin/entrypoint.sh -RUN chmod +x /usr/local/bin/entrypoint.sh +RUN cat <<'EOF' > /usr/local/bin/entrypoint.sh \ + && chmod +x /usr/local/bin/entrypoint.sh +#!/bin/bash +set -e + +ASSETS_PATH="/home/frappe/frappe-bench/sites/assets" +BAKED_PATH="/home/frappe/frappe-bench/assets" + +echo "Linking fresh assets to volume..." +rm -rf "$ASSETS_PATH" +mkdir -p "$(dirname "$ASSETS_PATH")" +ln -s "$BAKED_PATH" "$ASSETS_PATH" + +exec "$@" +EOF USER frappe ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]