mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-12-18 20:04:17 +01:00
Update Dockerfile to Alpine 3.22 and add Calibre
Bump base image and community repository to Alpine 3.22. Add Calibre and related package fixes to the installed packages. Improve comments and update package installation commands for clarity.
This commit is contained in:
parent
8d18e7dcd0
commit
eb6b86160a
3
.github/workflows/build.yml
vendored
3
.github/workflows/build.yml
vendored
@ -267,8 +267,7 @@ jobs:
|
||||
|
||||
test-build-docker-images:
|
||||
if: (github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch') && needs.files-changed.outputs.docker == 'true'
|
||||
# needs: [files-changed, build] # tmp disable
|
||||
needs: [files-changed]
|
||||
needs: [files-changed, build, docker-compose-tests] # tmp disable
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
||||
@ -21,14 +21,14 @@ ENV DISABLE_ADDITIONAL_FEATURES=false STIRLING_PDF_DESKTOP_UI=false
|
||||
RUN ./gradlew clean build -x spotlessApply -x spotlessCheck -x test -x sonarqube
|
||||
|
||||
# Main stage
|
||||
FROM alpine:3.20
|
||||
FROM alpine:3.22
|
||||
|
||||
ARG VERSION_TAG
|
||||
|
||||
# Community-Repo aktivieren
|
||||
RUN echo "http://dl-cdn.alpinelinux.org/alpine/v3.20/community" >> /etc/apk/repositories
|
||||
# Enable community repository
|
||||
RUN echo "http://dl-cdn.alpinelinux.org/alpine/v3.22/community" >> /etc/apk/repositories
|
||||
|
||||
# Alle Pakete in einem RUN
|
||||
# Install all packages in one RUN command
|
||||
RUN --mount=type=cache,target=/var/cache/apk \
|
||||
apk upgrade --no-cache && \
|
||||
apk add --no-cache \
|
||||
@ -43,7 +43,7 @@ RUN --mount=type=cache,target=/var/cache/apk \
|
||||
openssl-dev \
|
||||
openjdk21-jre \
|
||||
ffmpeg \
|
||||
# Doc conversion
|
||||
# Document conversion
|
||||
gcompat \
|
||||
libc6-compat \
|
||||
libreoffice \
|
||||
@ -69,7 +69,10 @@ RUN --mount=type=cache,target=/var/cache/apk \
|
||||
py3-opencv \
|
||||
ocrmypdf \
|
||||
py3-pillow \
|
||||
py3-pdf2image
|
||||
py3-pdf2image \
|
||||
# Calibre
|
||||
calibre && \
|
||||
apk fix --no-cache calibre
|
||||
|
||||
# Python venv + pip packages
|
||||
RUN set -eux; \
|
||||
@ -86,8 +89,7 @@ COPY app/core/src/main/resources/static/fonts/*.ttf /usr/share/fonts/opentype/no
|
||||
# first /app directory is for the build stage, second is for the final image
|
||||
COPY --from=build /app/app/core/build/libs/*.jar app.jar
|
||||
|
||||
|
||||
# Verzeichnisse, Fonts, Rechte
|
||||
# Directories, fonts, permissions
|
||||
RUN set -eux; \
|
||||
mv /usr/share/tessdata /usr/share/tessdata-original && \
|
||||
mkdir -p /home/stirlingpdfuser /configs /logs /customFiles /pipeline/watchedFolders /pipeline/finishedFolders /tmp/stirling-pdf && \
|
||||
@ -99,7 +101,7 @@ RUN set -eux; \
|
||||
/home/stirlingpdfuser /scripts /usr/share/fonts/opentype/noto \
|
||||
/configs /customFiles /pipeline /tmp/stirling-pdf /app.jar
|
||||
|
||||
# Set Environment Variables
|
||||
# Set environment variables
|
||||
ENV DISABLE_ADDITIONAL_FEATURES=true \
|
||||
VERSION_TAG=$VERSION_TAG \
|
||||
JAVA_BASE_OPTS="-XX:+UnlockExperimentalVMOptions -XX:MaxRAMPercentage=75 -XX:InitiatingHeapOccupancyPercent=20 -XX:+G1PeriodicGCInvokesConcurrent -XX:G1PeriodicGCInterval=10000 -XX:+UseStringDeduplication -XX:G1PeriodicGCSystemLoadThreshold=70" \
|
||||
@ -120,6 +122,7 @@ ENV DISABLE_ADDITIONAL_FEATURES=true \
|
||||
TMP=/tmp/stirling-pdf
|
||||
|
||||
EXPOSE 8080/tcp
|
||||
|
||||
# Set user and run command
|
||||
ENTRYPOINT ["tini", "--", "/scripts/init.sh"]
|
||||
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"]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user