diff --git a/livekit_middleware_dockerfile b/livekit_middleware_dockerfile index cc22f03..c5c7f6d 100644 --- a/livekit_middleware_dockerfile +++ b/livekit_middleware_dockerfile @@ -18,7 +18,14 @@ LABEL version="${VERSION}" \ USER root RUN apk --no-cache add \ - unzip + 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 \ + && echo "php bin/console fos:js-routing:dump --format=json --target=assets/data/fos_routes.json" >> /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 \ @@ -32,10 +39,8 @@ RUN --mount=type=secret,id=ARTIFACT_USER \ && chown -R nobody var \ && chmod -R 700 public \ && chmod -R 700 var \ - && rm artifact.zip - -RUN rm -r var/cache \ - && rm -rf /var/cache/apk/* + && rm artifact.zip \ + && rm -r var/cache USER nobody