From 71d82290a6dbae32d21640bc074391b27c1fa2c8 Mon Sep 17 00:00:00 2001 From: holzi1005 Date: Mon, 18 Nov 2024 15:35:34 +0100 Subject: [PATCH] update from image version --- odc_application_dockerfile.txt | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/odc_application_dockerfile.txt b/odc_application_dockerfile.txt index 988e797..192c8c3 100644 --- a/odc_application_dockerfile.txt +++ b/odc_application_dockerfile.txt @@ -1,7 +1,8 @@ -FROM erseco/alpine-php-webserver:3.20.5 +ARG VERSION +ARG SUPERCRONIC_VERSION=0.2.33 +ARG PHP_IMAGE_VERSION=3.20.5 -ARG VERSION= -ARG WEBDIR=/var/www/html +FROM erseco/alpine-php-webserver:${PHP_IMAGE_VERSION} LABEL version="${VERSION}" \ Maintainer="H2 invent GmbH" \ @@ -28,7 +29,7 @@ RUN mkdir /etc/service/cron \ && chown -R nobody:nobody /etc/service/cron \ && chmod -R +x /etc/service/cron -RUN wget https://github.com/aptible/supercronic/releases/download/v0.2.33/supercronic-linux-amd64 -O /supercronic \ +RUN wget https://github.com/aptible/supercronic/releases/download/v${SUPERCRONIC_VERSION}/supercronic-linux-amd64 -O /supercronic \ && chmod +x /supercronic RUN wget https://git.h2-invent.com/Public-System-Design/Public-Helperscripts/raw/branch/main/distributed_cron.sh -O /distributed_cron.sh \ @@ -38,25 +39,25 @@ RUN echo "# Docker Cron Jobs" > /var/crontab \ && echo "SHELL=/bin/sh" >> /var/crontab \ && echo "* * * * * date" >> /var/crontab \ && echo "0 1 * * * curl https://open-datenschutzcenter.de/health/check" >> /var/crontab \ - && echo "0 9 * * 1-5 /bin/sh /distributed_cron.sh '${WEBDIR}/data/cron_log' 'php ${WEBDIR}/bin/console app:cron'" >> /var/crontab \ + && echo "0 9 * * 1-5 /bin/sh /distributed_cron.sh 'data/cron_log' 'php /var/www/html/bin/console app:cron'" >> /var/crontab \ && echo "" >> /var/crontab RUN echo "#!/bin/sh" > /docker-entrypoint-init.d/01-symfony.sh \ - && echo "php ${WEBDIR}/bin/console cache:clear" >> /docker-entrypoint-init.d/01-symfony.sh \ - && echo "php ${WEBDIR}/bin/console doc:mig:mig --no-interaction" >> /docker-entrypoint-init.d/01-symfony.sh \ - && echo "php ${WEBDIR}/bin/console cache:clear" >> /docker-entrypoint-init.d/01-symfony.sh \ + && echo "php bin/console cache:clear" >> /docker-entrypoint-init.d/01-symfony.sh \ + && echo "php bin/console doc:mig:mig --no-interaction" >> /docker-entrypoint-init.d/01-symfony.sh \ + && echo "php bin/console cache:clear" >> /docker-entrypoint-init.d/01-symfony.sh \ && chmod +x /docker-entrypoint-init.d/01-symfony.sh RUN wget https://github.com/H2-invent/open-datenschutzcenter/releases/download/${VERSION}/application.zip -O artifact.zip \ && unzip artifact.zip -d ${WEBDIR} \ - && chown -R nobody ${WEBDIR}/public \ - && chown -R nobody ${WEBDIR}/var \ - && chmod -R 700 ${WEBDIR}/public \ - && chmod -R 700 ${WEBDIR}/var + && chown -R nobody public \ + && chown -R nobody var \ + && chmod -R 700 public \ + && chmod -R 700 var RUN apk del unzip \ && rm artifact.zip \ - && rm -r ${WEBDIR}/var/cache \ + && rm -r var/cache \ && rm -rf /var/cache/apk/* USER nobody