atlasbot/Dockerfile

29 lines
818 B
Docker
Raw Normal View History

FROM registry.bstein.dev/bstein/python:3.12-slim AS base
2026-01-28 11:46:52 -03:00
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1 \
PIP_DEFAULT_TIMEOUT=60
2026-01-28 11:46:52 -03:00
WORKDIR /app
2026-02-05 15:37:52 -03:00
COPY requirements.txt /app/requirements.txt
COPY pyproject.toml /app/pyproject.toml
RUN pip install --no-cache-dir --retries 10 -r /app/requirements.txt
2026-01-28 11:46:52 -03:00
COPY atlasbot /app/atlasbot
RUN addgroup --system atlasbot && \
adduser --system --ingroup atlasbot --home /app atlasbot && \
chown -R atlasbot:atlasbot /app
2026-01-28 11:46:52 -03:00
2026-02-03 19:08:26 -03:00
FROM base AS test
COPY requirements-dev.txt /app/requirements-dev.txt
RUN pip install --no-cache-dir --retries 10 -r /app/requirements-dev.txt
COPY testing /app/testing
2026-02-03 19:08:26 -03:00
COPY tests /app/tests
2026-02-03 19:32:14 -03:00
COPY scripts /app/scripts
2026-02-03 19:08:26 -03:00
FROM base AS runtime
2026-01-28 11:46:52 -03:00
EXPOSE 8090
USER atlasbot
2026-01-28 11:46:52 -03:00
CMD ["python", "-m", "atlasbot.main"]