From 3fd3a9846f233702d4300a45416551ae565ce528 Mon Sep 17 00:00:00 2001 From: holzi1005 Date: Tue, 26 Nov 2024 16:18:10 +0100 Subject: [PATCH] Remove the creation of the keys --- livekit_middleware_dockerfile | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/livekit_middleware_dockerfile b/livekit_middleware_dockerfile index bf8e1df..cc22f03 100644 --- a/livekit_middleware_dockerfile +++ b/livekit_middleware_dockerfile @@ -18,14 +18,7 @@ LABEL version="${VERSION}" \ USER root RUN apk --no-cache add \ - unzip \ - openssl - -RUN echo "#!/bin/sh" > /docker-entrypoint-init.d/02-openssl.sh \ - && echo "openssl genrsa -out ${WEBDIR}/private.pem" >> /docker-entrypoint-init.d/02-openssl.sh \ - && echo "openssl rsa -in ${WEBDIR}/private.pem -pubout -out ${WEBDIR}/public/public.pem" >> /docker-entrypoint-init.d/02-openssl.sh \ - && echo "chown nobody ${WEBDIR}/private.pem" >> /docker-entrypoint-init.d/02-openssl.sh \ - && chmod +x /docker-entrypoint-init.d/* + unzip RUN --mount=type=secret,id=ARTIFACT_USER \ --mount=type=secret,id=ARTIFACT_SECRET \ @@ -34,17 +27,14 @@ RUN --mount=type=secret,id=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 \ - && 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 + && unzip artifact.zip \ + && chown -R nobody public \ + && chown -R nobody var \ + && chmod -R 700 public \ + && chmod -R 700 var \ + && rm artifact.zip -RUN apk del unzip \ - && rm artifact.zip \ - && rm ${WEBDIR}/private.pem \ - && rm ${WEBDIR}/public/public.pem \ - && rm -r ${WEBDIR}/var/cache \ +RUN rm -r var/cache \ && rm -rf /var/cache/apk/* USER nobody