From dc7a25cde3031676f87a118853807d14880b66b5 Mon Sep 17 00:00:00 2001 From: Erika Pauwels Date: Tue, 21 Oct 2025 10:22:35 +0200 Subject: [PATCH] Run on-build script before installation of dependencies Typical use case for the on-build script is to install system dependencies required by npm libraries. Therefore the script needs to be executed before the installation of the dependencies. --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index cab2010..b265ede 100644 --- a/Dockerfile +++ b/Dockerfile @@ -41,11 +41,10 @@ CMD ["bash", "boot.sh"] # This stuff only runs when building an image from the template ONBUILD RUN rm -Rf /app/scripts ONBUILD ADD . /app/ -ONBUILD RUN /usr/src/app/build-production.sh - ONBUILD RUN if [ -f /app/on-build.sh ]; \ then \ echo "Running custom on-build.sh of child" \ && chmod +x /app/on-build.sh \ && /bin/bash /app/on-build.sh ;\ fi +ONBUILD RUN /usr/src/app/build-production.sh