From 1213656ff19972c7a9419468b316a5fd907b1cbf Mon Sep 17 00:00:00 2001 From: holzi1005 Date: Tue, 21 Jan 2025 07:53:17 +0100 Subject: [PATCH] update dockerfile to multistage --- jitsi_admin_application_dockerfile | 22 +++++++++------------- jitsi_admin_websocket_dockerfile | 7 +++---- 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/jitsi_admin_application_dockerfile b/jitsi_admin_application_dockerfile index c53f54f..d153f02 100644 --- a/jitsi_admin_application_dockerfile +++ b/jitsi_admin_application_dockerfile @@ -21,6 +21,15 @@ RUN sed -i "s/^laF_version=.*/laF_version=${VERSION}/" .env RUN tar \ --exclude='./.github' \ --exclude='./.git' \ + --exclude='./docs' \ + --exclude='./documentation' \ + --exclude='./installer' \ + --exclude='./docker' \ + --exclude='./nodejs' \ + --exclude='./debian_installer' \ + --exclude='./jstest' \ + --exclude='./testjwt' \ + --exclude='./traefik' \ --exclude='./node_modules' \ --exclude='./var/cache' \ --exclude='./var/log' \ @@ -46,11 +55,6 @@ LABEL version="${VERSION}" \ USER root RUN apk --no-cache add \ php83-ldap \ - php83-xmlwriter \ - php83-xsl \ - php83-pcntl \ - php83-posix \ - php83-sockets \ php83-bcmath \ && rm -rf /var/cache/apk/* @@ -81,14 +85,6 @@ RUN echo "# Docker Cron Jobs" > /var/crontab \ && echo "" >> /var/crontab \ && chown nobody:nobody /var/crontab -RUN echo "#!/bin/sh" > /docker-entrypoint-init.d/02-theme.sh \ - && echo "if [ -d "data/theme" ]" >> /docker-entrypoint-init.d/02-theme.sh \ - && echo "then" >> /docker-entrypoint-init.d/02-theme.sh \ - && echo " cp data/theme/*.json.signed theme/" >> /docker-entrypoint-init.d/02-theme.sh \ - && echo " cp -r data/theme/public/* public/" >> /docker-entrypoint-init.d/02-theme.sh \ - && echo "fi" >> /docker-entrypoint-init.d/02-theme.sh \ - && chmod +x /docker-entrypoint-init.d/02-theme.sh - RUN echo "#!/bin/sh" > /docker-entrypoint-init.d/03-symfony.sh \ && echo "php bin/console cache:clear" >> /docker-entrypoint-init.d/03-symfony.sh \ && echo "php bin/console doc:mig:mig --no-interaction" >> /docker-entrypoint-init.d/03-symfony.sh \ diff --git a/jitsi_admin_websocket_dockerfile b/jitsi_admin_websocket_dockerfile index b098b80..00af1d4 100644 --- a/jitsi_admin_websocket_dockerfile +++ b/jitsi_admin_websocket_dockerfile @@ -17,14 +17,13 @@ LABEL version="${VERSION}" \ WORKDIR /usr/src/app +COPY nodejs . + RUN apk --no-cache add \ curl \ && rm -rf /var/cache/apk/* -RUN wget https://github.com/H2-invent/jitsi-admin/releases/download/${VERSION}/websocket.zip -O artifact.zip \ - && unzip artifact.zip \ - && chown -R nobody . \ - && rm artifact.zip +RUN npm install EXPOSE 3000