15 lines
342 B
Docker
15 lines
342 B
Docker
FROM python:3.12-slim
|
|
|
|
WORKDIR /app
|
|
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
COPY . .
|
|
|
|
# Run as a non-root user — no reason for a web process to have root privileges
|
|
RUN adduser --disabled-password --no-create-home appuser
|
|
USER appuser
|
|
|
|
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|