Files
nvidia-stock-bot/Dockerfile
T
Djeex 86b3bbbc1b Run the container as a non-root user
Add a static UID/GID 911 user (matching the socket-proxy/adguard-cidre
convention) and drop to it before running main.py. No PUID/PGID env var
or entrypoint chown logic needed here, unlike adguard-cidre — this
container has no volume mount and writes nothing to disk.
2026-08-23 14:29:13 +02:00

28 lines
438 B
Docker

FROM python:3.14.7-alpine AS base
RUN apk add --no-cache ca-certificates
WORKDIR /app
COPY VERSION /VERSION
COPY /app/ /app/
RUN pip install --no-cache-dir -r requirements.txt
FROM base AS test
RUN pip install --no-cache-dir pytest==9.1.1
COPY pytest.ini /app/pytest.ini
COPY /tests/ /app/tests/
CMD ["pytest", "-v"]
FROM base
RUN addgroup -g 911 nvbot && adduser -D -u 911 -G nvbot nvbot
USER nvbot
CMD ["python", "main.py"]