Files
Stirling-PDF/Dockerfile.dev
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

56 lines
1.7 KiB
Docker
Raw Normal View History

2025-03-02 20:35:41 +01:00
# dockerfile.dev
# Basisimage: Gradle mit JDK 17 (Debian-basiert)
FROM gradle:8.14-jdk17
2025-03-02 20:35:41 +01:00
# Als Root-Benutzer arbeiten, um benötigte Pakete zu installieren
USER root
2025-03-11 15:12:00 +01:00
# Set GRADLE_HOME und füge Gradle zum PATH hinzu
ENV GRADLE_HOME=/opt/gradle
ENV PATH="$GRADLE_HOME/bin:$PATH"
2025-03-02 20:35:41 +01:00
# Update und Installation zusätzlicher Pakete (Debian/Ubuntu-basiert)
RUN apt-get update && apt-get install -y \
2025-03-11 15:12:00 +01:00
sudo \
2025-03-02 20:35:41 +01:00
libreoffice \
poppler-utils \
qpdf \
2025-03-11 15:12:00 +01:00
# settings.yml | tessdataDir: /usr/share/tesseract-ocr/5/tessdata
2025-03-02 20:35:41 +01:00
tesseract-ocr \
tesseract-ocr-eng \
2025-03-11 15:12:00 +01:00
fonts-terminus fonts-dejavu fonts-font-awesome fonts-noto fonts-noto-core fonts-noto-cjk fonts-noto-extra fonts-liberation fonts-linuxlibertine \
python3-uno \
2025-03-02 20:35:41 +01:00
python3-venv \
2025-03-11 15:12:00 +01:00
# ss -tln
iproute2 \
2025-03-02 20:35:41 +01:00
&& 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
2025-03-11 15:12:00 +01:00
RUN python3 -m venv --system-site-packages /opt/venv \
2025-03-02 20:35:41 +01:00
&& . /opt/venv/bin/activate \
2025-05-27 17:25:41 +01:00
&& pip install --upgrade pip setuptools \
2025-03-02 20:35:41 +01:00
&& 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"
2025-03-11 15:12:00 +01:00
COPY . /workspace
2025-03-02 20:35:41 +01:00
2025-03-11 15:12:00 +01:00
RUN adduser --disabled-password --gecos '' devuser \
2025-03-02 21:13:14 +01:00
&& chown -R devuser:devuser /home/devuser /workspace
2025-03-11 15:12:00 +01:00
RUN echo "devuser ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/devuser \
&& chmod 0440 /etc/sudoers.d/devuser
2025-03-02 20:35:41 +01:00
# Setze das Arbeitsverzeichnis (wird später per Bind-Mount überschrieben)
WORKDIR /workspace
2025-03-11 15:12:00 +01:00
RUN chmod +x /workspace/.devcontainer/git-init.sh
RUN sudo chmod +x /workspace/.devcontainer/init-setup.sh
2025-03-02 20:35:41 +01:00
# Wechsel zum NichtRoot Benutzer
USER devuser