2025-03-02 20:35:41 +01:00
|
|
|
|
# dockerfile.dev
|
|
|
|
|
|
|
|
|
|
# Basisimage: Gradle mit JDK 17 (Debian-basiert)
|
|
|
|
|
FROM gradle:8.12-jdk17
|
|
|
|
|
|
|
|
|
|
# Als Root-Benutzer arbeiten, um benötigte Pakete zu installieren
|
|
|
|
|
USER root
|
|
|
|
|
|
|
|
|
|
# Update und Installation zusätzlicher Pakete (Debian/Ubuntu-basiert)
|
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
|
|
|
wget \
|
|
|
|
|
ca-certificates \
|
|
|
|
|
tzdata \
|
|
|
|
|
tini \
|
|
|
|
|
bash \
|
|
|
|
|
curl \
|
|
|
|
|
libreoffice \
|
|
|
|
|
poppler-utils \
|
|
|
|
|
qpdf \
|
|
|
|
|
tesseract-ocr \
|
|
|
|
|
tesseract-ocr-eng \
|
|
|
|
|
fonts-dejavu \
|
|
|
|
|
fonts-noto \
|
|
|
|
|
python3 \
|
|
|
|
|
python3-pip \
|
|
|
|
|
python3-venv \
|
|
|
|
|
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
|
|
# Setze die Environment Variable für setuptools
|
|
|
|
|
ENV SETUPTOOLS_USE_DISTUTILS=local
|
|
|
|
|
|
|
|
|
|
# Installation der benötigten Python-Pakete
|
|
|
|
|
RUN python3 -m venv /opt/venv \
|
|
|
|
|
&& . /opt/venv/bin/activate \
|
|
|
|
|
&& pip install --upgrade setuptools \
|
|
|
|
|
&& pip install --no-cache-dir WeasyPrint pdf2image pillow unoserver opencv-python-headless pre-commit
|
|
|
|
|
|
|
|
|
|
# Füge den venv-Pfad zur globalen PATH-Variable hinzu, damit die Tools verfügbar sind
|
|
|
|
|
ENV PATH="/opt/venv/bin:$PATH"
|
|
|
|
|
|
|
|
|
|
# Erstelle notwendige Verzeichnisse und lege einen Nicht‑Root Benutzer an
|
|
|
|
|
RUN mkdir -p /home/devuser/{configs,logs,customFiles,pipeline/watchedFolders,pipeline/finishedFolders} \
|
|
|
|
|
&& adduser --disabled-password --gecos '' devuser \
|
|
|
|
|
&& chown -R devuser:devuser /home/devuser
|
|
|
|
|
|
2025-03-02 21:13:14 +01:00
|
|
|
|
RUN mkdir -p /home/devuser/logs /workspace/logs /workspace/scripts /workspace/src/main/resources \
|
|
|
|
|
&& chown -R devuser:devuser /home/devuser /workspace
|
2025-03-02 20:35:41 +01:00
|
|
|
|
|
|
|
|
|
# Setze das Arbeitsverzeichnis (wird später per Bind-Mount überschrieben)
|
|
|
|
|
WORKDIR /workspace
|
|
|
|
|
|
|
|
|
|
# Wechsel zum Nicht‑Root Benutzer
|
|
|
|
|
USER devuser
|