From 52ccf0028be7dd19c873d8ea32b9a59763b99af1 Mon Sep 17 00:00:00 2001 From: calvin-li-developer <65045619+calvin-li-developer@users.noreply.github.com> Date: Thu, 10 Jul 2025 13:53:01 -0400 Subject: [PATCH] feat: migrate install logic of installFonts.sh to Dockerfile --- Dockerfile | 3 ++- Dockerfile.fat | 3 ++- Dockerfile.ultra-lite | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 84dddd1dc..5eccf86a7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -91,6 +91,7 @@ RUN echo "@main https://dl-cdn.alpinelinux.org/alpine/edge/main" | tee -a /etc/a fc-cache -f -v && \ chmod +x /scripts/* && \ chmod +x /scripts/init.sh && \ + /scripts/init.sh && \ # User permissions addgroup -S stirlingpdfgroup && adduser -S stirlingpdfuser -G stirlingpdfgroup && \ chown -R stirlingpdfuser:stirlingpdfgroup $HOME /scripts /usr/share/fonts/opentype/noto /configs /customFiles /pipeline /tmp/stirling-pdf && \ @@ -99,5 +100,5 @@ RUN echo "@main https://dl-cdn.alpinelinux.org/alpine/edge/main" | tee -a /etc/a EXPOSE 8080/tcp # Set user and run command -ENTRYPOINT ["tini", "--", "/scripts/init.sh"] +ENTRYPOINT ["tini", "--"] CMD ["sh", "-c", "java -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/tmp/stirling-pdf -jar /app.jar & /opt/venv/bin/unoserver --port 2003 --interface 127.0.0.1"] diff --git a/Dockerfile.fat b/Dockerfile.fat index 4053cd97f..6c82eb61e 100644 --- a/Dockerfile.fat +++ b/Dockerfile.fat @@ -103,6 +103,7 @@ RUN echo "@main https://dl-cdn.alpinelinux.org/alpine/edge/main" | tee -a /etc/a fc-cache -f -v && \ chmod +x /scripts/* && \ chmod +x /scripts/init.sh && \ + /scripts/init.sh && \ # User permissions addgroup -S stirlingpdfgroup && adduser -S stirlingpdfuser -G stirlingpdfgroup && \ chown -R stirlingpdfuser:stirlingpdfgroup $HOME /scripts /usr/share/fonts/opentype/noto /configs /customFiles /pipeline /tmp/stirling-pdf && \ @@ -110,5 +111,5 @@ RUN echo "@main https://dl-cdn.alpinelinux.org/alpine/edge/main" | tee -a /etc/a EXPOSE 8080/tcp # Set user and run command -ENTRYPOINT ["tini", "--", "/scripts/init.sh"] +ENTRYPOINT ["tini", "--"] CMD ["sh", "-c", "java -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/tmp/stirling-pdf -jar /app.jar & /opt/venv/bin/unoserver --port 2003 --interface 127.0.0.1"] diff --git a/Dockerfile.ultra-lite b/Dockerfile.ultra-lite index 283d3c983..979b76966 100644 --- a/Dockerfile.ultra-lite +++ b/Dockerfile.ultra-lite @@ -41,15 +41,15 @@ RUN echo "@testing https://dl-cdn.alpinelinux.org/alpine/edge/main" | tee -a /et # User permissions mkdir -p /configs /logs /customFiles /usr/share/fonts/opentype/noto /tmp/stirling-pdf && \ chmod +x /scripts/*.sh && \ + /scripts/init-without-ocr.sh && \ addgroup -S stirlingpdfgroup && adduser -S stirlingpdfuser -G stirlingpdfgroup && \ chown -R stirlingpdfuser:stirlingpdfgroup $HOME /scripts /configs /customFiles /pipeline /tmp/stirling-pdf && \ chown stirlingpdfuser:stirlingpdfgroup /app.jar - # Set environment variables ENV ENDPOINTS_GROUPS_TO_REMOVE=CLI EXPOSE 8080/tcp # Run the application -ENTRYPOINT ["tini", "--", "/scripts/init-without-ocr.sh"] +ENTRYPOINT ["tini", "--"] CMD ["java", "-Dfile.encoding=UTF-8", "-Djava.io.tmpdir=/tmp/stirling-pdf", "-jar", "/app.jar"] \ No newline at end of file