From 37902e88a395a42eef46601884d409432f23be77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Heitm=C3=BCller?= Date: Thu, 27 Nov 2025 11:42:54 +0100 Subject: [PATCH 1/4] allow custom config.php location MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - allow custom config.php location (required for running other container orchestrators like AWS ECS Fargate) - smaller docker image by removing some recommendations (e.g. x11 stuff) Signed-off-by: Stefan Heitmüller --- Dockerfile | 5 +++-- entrypoint.sh | 12 ++++++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 60c43e9..bd140f2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,6 @@ ENV DEBIAN_FRONTEND="noninteractive" RUN apt-get update && apt-get install -y \ nano \ - imagemagick \ apache2 \ subversion \ ghostscript \ @@ -26,11 +25,13 @@ RUN apt-get update && apt-get install -y \ php-mbstring \ php-zip \ libapache2-mod-php \ - ffmpeg \ libopencv-dev \ python3-opencv \ python3 \ python3-pip \ + && apt-get install -y --no-install-recommends \ + ffmpeg \ + imagemagick \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* diff --git a/entrypoint.sh b/entrypoint.sh index d1f4ebe..f240a1a 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,10 +1,18 @@ #!/bin/bash +# Add config.php from custom location if set +if [[ -n "${CUSTOM_CONFIG_PHP_LOCATION}" ]]; then + ln -sf "${CUSTOM_CONFIG_PHP_LOCATION}" /var/ww/html/include/config.php +fi + # Start cron service service cron start # Ensure daily cron jobs are executable chmod +x /etc/cron.daily/* -# Start Apache in the foreground (keeps the container alive) -apachectl -D FOREGROUND +# Start Apache +service apache2 start + +# keeps the container alive +tail -f /var/log/apache2/*.log From 0f4e4a72d4c28111562399fbab63bdb4ad017655 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Heitm=C3=BCller?= Date: Thu, 27 Nov 2025 12:56:24 +0100 Subject: [PATCH 2/4] fix typo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stefan Heitmüller --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index f240a1a..ade7600 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -2,7 +2,7 @@ # Add config.php from custom location if set if [[ -n "${CUSTOM_CONFIG_PHP_LOCATION}" ]]; then - ln -sf "${CUSTOM_CONFIG_PHP_LOCATION}" /var/ww/html/include/config.php + ln -sf "${CUSTOM_CONFIG_PHP_LOCATION}" /var/www/html/include/config.php fi # Start cron service From 26f1e5e2ae1a1a797bf7578cd0279368ff5c5db3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Heitm=C3=BCller?= Date: Fri, 5 Dec 2025 08:16:00 +0100 Subject: [PATCH 3/4] add php-ldap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stefan Heitmüller --- Dockerfile | 79 +++++++++++++++++++++++++++++++++--------------------- 1 file changed, 49 insertions(+), 30 deletions(-) diff --git a/Dockerfile b/Dockerfile index bd140f2..c6fb78e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,19 @@ -FROM ubuntu:24.04 +ARG ubuntu=24.04 + +FROM ubuntu:${ubuntu} LABEL org.opencontainers.image.authors="Montala Ltd" ENV DEBIAN_FRONTEND="noninteractive" -RUN apt-get update && apt-get install -y \ +ARG php=8.3 + +ARG TARGETARCH + +RUN --mount=type=cache,id=ubuntu-${TARGETARCH},target=/var/lib/apt/lists,sharing=locked <\n\ -\tOptions FollowSymLinks\n\ -\n'\ ->> /etc/apache2/sites-enabled/000-default.conf +RUN <' + echo -e '\tOptions FollowSymLinks' + echo '' +) >>/etc/apache2/sites-enabled/000-default.conf +EOI ADD cronjob /etc/cron.daily/resourcespace WORKDIR /var/www/html -RUN rm -f index.html \ - && svn co -q https://svn.resourcespace.com/svn/rs/releases/10.7 . \ - && mkdir -p filestore \ - && chmod 777 filestore \ - && chmod -R 777 include/ - +RUN < Date: Fri, 5 Dec 2025 10:02:45 +0100 Subject: [PATCH 4/4] fix Dockerfile syntax MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stefan Heitmüller --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c6fb78e..b6eab61 100644 --- a/Dockerfile +++ b/Dockerfile @@ -53,7 +53,7 @@ sed -i -e "s/max_execution_time\s*=\s*30/max_execution_time = 300/g" /etc/php/${ sed -i -e "s/memory_limit\s*=\s*128M/memory_limit = 1G/g" /etc/php/${php}/apache2/php.ini EOI -RUN <'