update dockerfile to multistage
This commit is contained in:
parent
0e881bd5bc
commit
1213656ff1
2 changed files with 12 additions and 17 deletions
|
@ -21,6 +21,15 @@ RUN sed -i "s/^laF_version=.*/laF_version=${VERSION}/" .env
|
||||||
RUN tar \
|
RUN tar \
|
||||||
--exclude='./.github' \
|
--exclude='./.github' \
|
||||||
--exclude='./.git' \
|
--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='./node_modules' \
|
||||||
--exclude='./var/cache' \
|
--exclude='./var/cache' \
|
||||||
--exclude='./var/log' \
|
--exclude='./var/log' \
|
||||||
|
@ -46,11 +55,6 @@ LABEL version="${VERSION}" \
|
||||||
USER root
|
USER root
|
||||||
RUN apk --no-cache add \
|
RUN apk --no-cache add \
|
||||||
php83-ldap \
|
php83-ldap \
|
||||||
php83-xmlwriter \
|
|
||||||
php83-xsl \
|
|
||||||
php83-pcntl \
|
|
||||||
php83-posix \
|
|
||||||
php83-sockets \
|
|
||||||
php83-bcmath \
|
php83-bcmath \
|
||||||
&& rm -rf /var/cache/apk/*
|
&& rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
|
@ -81,14 +85,6 @@ RUN echo "# Docker Cron Jobs" > /var/crontab \
|
||||||
&& echo "" >> /var/crontab \
|
&& echo "" >> /var/crontab \
|
||||||
&& chown nobody:nobody /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 \
|
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 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 \
|
&& echo "php bin/console doc:mig:mig --no-interaction" >> /docker-entrypoint-init.d/03-symfony.sh \
|
||||||
|
|
|
@ -17,14 +17,13 @@ LABEL version="${VERSION}" \
|
||||||
|
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
|
COPY nodejs .
|
||||||
|
|
||||||
RUN apk --no-cache add \
|
RUN apk --no-cache add \
|
||||||
curl \
|
curl \
|
||||||
&& rm -rf /var/cache/apk/*
|
&& rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
RUN wget https://github.com/H2-invent/jitsi-admin/releases/download/${VERSION}/websocket.zip -O artifact.zip \
|
RUN npm install
|
||||||
&& unzip artifact.zip \
|
|
||||||
&& chown -R nobody . \
|
|
||||||
&& rm artifact.zip
|
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue