Public-Dockerfiles/livekit_middleware_dockerfile

48 lines
1.8 KiB
Text
Raw Permalink Normal View History

2024-11-22 13:35:58 +01:00
ARG PHP_IMAGE_VERSION=3.20.6
2024-11-18 15:33:20 +01:00
FROM erseco/alpine-php-webserver:${PHP_IMAGE_VERSION}
2024-11-18 19:36:47 +01:00
ARG VERSION
LABEL version="${VERSION}" \
Maintainer="H2 invent GmbH" \
Description="Meetling Livekit Middleware" \
org.opencontainers.version="${VERSION}" \
org.opencontainers.image.title="Meetling Livekit Middleware" \
org.opencontainers.image.license="BSL" \
org.opencontainers.image.vendor="H2 invent GmbH" \
org.opencontainers.image.authors="Andreas Holzmann <support@h2-invent.com>" \
org.opencontainers.image.source="https://github.com/h2-invent/livekit" \
org.opencontainers.image.documentation="https://meetling.de" \
org.opencontainers.image.url="https://meetling.de"
USER root
RUN apk --no-cache add \
2024-11-28 16:05:07 +01:00
unzip \
&& rm -rf /var/cache/apk/*
RUN echo "#!/bin/sh" > /docker-entrypoint-init.d/02-symfony.sh \
&& echo "php bin/console cache:clear" >> /docker-entrypoint-init.d/02-symfony.sh \
&& echo "php bin/console cache:warmup" >> /docker-entrypoint-init.d/02-symfony.sh \
&& chmod +x /docker-entrypoint-init.d/02-symfony.sh
RUN --mount=type=secret,id=ARTIFACT_USER \
--mount=type=secret,id=ARTIFACT_SECRET \
--mount=type=secret,id=ARTIFACT_URL \
ARTIFACT_USER=$(cat /run/secrets/ARTIFACT_USER) \
ARTIFACT_SECRET=$(cat /run/secrets/ARTIFACT_SECRET) \
ARTIFACT_URL=$(cat /run/secrets/ARTIFACT_URL) \
&& wget https://${ARTIFACT_USER}:${ARTIFACT_SECRET}@${ARTIFACT_URL}-${VERSION}.zip -O artifact.zip \
2024-11-26 16:18:10 +01:00
&& unzip artifact.zip \
&& chown -R nobody public \
&& chown -R nobody var \
&& chmod -R 700 public \
&& chmod -R 700 var \
2024-11-28 16:05:07 +01:00
&& rm artifact.zip \
&& rm -r var/cache
USER nobody
ENV nginx_root_directory=/var/www/html/public \
2024-11-22 13:35:58 +01:00
upload_max_filesize=10M \
date_timezone=Europe/Berlin