fix: embed entrypoint for layered image

This commit is contained in:
dandax123 2026-05-01 06:45:27 +02:00
parent 5cdd428a66
commit 799aa4e561

View file

@ -46,8 +46,21 @@ VOLUME [ \
USER root USER root
# This entrypoint script link build assets of the image to the mounted sites volume at container initialization # 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 cat <<'EOF' > /usr/local/bin/entrypoint.sh \
RUN chmod +x /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 USER frappe
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]