-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (24 loc) · 705 Bytes
/
Dockerfile
File metadata and controls
31 lines (24 loc) · 705 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Base Python image
FROM python:3.12-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1
WORKDIR /app
# System deps for OCR / pdf rendering
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
tesseract-ocr \
poppler-utils \
build-essential \
libgl1 \
python3-tk \
&& rm -rf /var/lib/apt/lists/*
# Install Python deps
COPY requirements.txt .
RUN python -m pip install --upgrade pip && python -m pip install -r requirements.txt
# Copy source
COPY . .
# Create non-root user and switch
RUN useradd -m appuser
USER appuser
# Default command: launch the viewer UI
CMD ["python", "pdf_viewer_app.py"]