Files
pdf/gateway/Dockerfile
T
2026-07-17 15:13:26 +05:30

39 lines
833 B
Docker

FROM python:3.11-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1 \
PORT=8000
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
cmake \
ninja-build \
pkg-config \
git \
libjpeg-dev \
zlib1g-dev \
libpng-dev \
&& rm -rf /var/lib/apt/lists/*
RUN groupadd --system app \
&& useradd --system --gid app --create-home --home-dir /home/app app
WORKDIR /home/app
COPY pyproject.toml README.md ./
RUN python -m pip install --upgrade pip \
&& pip install --no-cache-dir -e ".[dev]"
COPY app ./app
COPY tests ./tests
RUN chown -R app:app /home/app
USER app
EXPOSE 8000
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]