Files
pdf2csv/Dockerfile
2025-10-12 02:10:57 +02:00

25 lines
720 B
Docker

# Image Python légère
FROM python:3.11-slim
# Installer Java (tabula-py utilise tabula-java)
RUN apt-get update && apt-get install -y --no-install-recommends \
openjdk-17-jre-headless \
&& rm -rf /var/lib/apt/lists/*
# (Optionnel) encodage propre côté JVM
ENV JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF-8"
# Copier et installer les dépendances Python
COPY requirements.txt /tmp/requirements.txt
RUN pip install --no-cache-dir -r /tmp/requirements.txt && rm /tmp/requirements.txt
# Copier le script dans l'image
WORKDIR /app
COPY convert.py /app/convert.py
# Répertoire de travail contenant les PDF (sera monté en volume)
WORKDIR /data
# Lancer le script sur /data
ENTRYPOINT ["python", "/app/convert.py"]