-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (32 loc) · 956 Bytes
/
Copy pathDockerfile
File metadata and controls
41 lines (32 loc) · 956 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
32
33
34
35
36
37
38
39
40
41
# NPQsimple Dockerfile
# Multi-arch: AMD64/ARM64 via python:3.11-slim base
FROM python:3.11-slim
# Install system dependencies
# - pdf2image requires poppler-utils
# - LaTeX image generation requires TeX Live packages
RUN apt-get update && \
apt-get install -y --no-install-recommends \
poppler-utils \
texlive-latex-base \
texlive-latex-extra \
texlive-fonts-recommended \
texlive-fonts-extra \
texlive-science \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Install Python deps
COPY requirements.txt ./
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# Copy app source
COPY . .
# Default environment (overridable)
ENV HOST=0.0.0.0 \
PORT=8050 \
OMNIBOARD_DISABLE=1
# Improve runtime security: run as non-root user
RUN useradd -m appuser \
&& chown -R appuser:appuser /app
USER appuser
EXPOSE 8050
CMD ["python", "index.py"]