update dockerfiles

This commit is contained in:
Calvin Li 2025-07-17 17:49:58 -04:00 committed by GitHub
parent e2fb2a5fa7
commit a28ce8af02
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 20 additions and 9 deletions

View File

@ -91,10 +91,16 @@ 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 && \
chmod +x /scripts/download-security-jar.sh && \
chmod +x /scripts/installFonts.sh $LANGS && \
/scripts/init.sh && \
/scripts/download-security-jar.sh && \
if [[ -n "$LANGS" ]]; then \
/scripts/installFonts.sh $LANGS
fi
# 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 && \
/scripts/init.sh && \
chown stirlingpdfuser:stirlingpdfgroup /app.jar
EXPOSE 8080/tcp

View File

@ -104,10 +104,13 @@ 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 && \
if [[ -n "$LANGS" ]]; then \
/scripts/installFonts.sh $LANGS
fi
# 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 && \
/scripts/init.sh && \
chown stirlingpdfuser:stirlingpdfgroup /app.jar
EXPOSE 8080/tcp

View File

@ -41,9 +41,11 @@ 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 && \
chmod +x /scripts/download-security-jar.sh && \
/scripts/init-without-ocr.sh && \
/scripts/download-security-jar.sh && \
addgroup -S stirlingpdfgroup && adduser -S stirlingpdfuser -G stirlingpdfgroup && \
chown -R stirlingpdfuser:stirlingpdfgroup $HOME /scripts /configs /customFiles /pipeline /tmp/stirling-pdf && \
/scripts/init-without-ocr.sh && \
chown stirlingpdfuser:stirlingpdfgroup /app.jar
# Set environment variables
ENV ENDPOINTS_GROUPS_TO_REMOVE=CLI

View File

@ -19,13 +19,13 @@ if [[ "$INSTALL_BOOK_AND_ADVANCED_HTML_OPS" == "true" && "$FAT_DOCKER" != "true"
#apk add --no-cache calibre@testing
fi
if [[ "$FAT_DOCKER" != "true" ]]; then
/scripts/download-security-jar.sh
fi
# if [[ "$FAT_DOCKER" != "true" ]]; then
# /scripts/download-security-jar.sh
# fi
if [[ -n "$LANGS" ]]; then
/scripts/installFonts.sh $LANGS
fi
# if [[ -n "$LANGS" ]]; then
# /scripts/installFonts.sh $LANGS
# fi
echo "Setting permissions and ownership for necessary directories..."
# Ensure temp directory exists and has correct permissions