Update Dockerfile to specify Python image digest and add support for build checks

This commit is contained in:
2025-07-04 05:58:36 +02:00
parent 679fedb099
commit 480b36ad85

View File

@ -1,13 +1,22 @@
FROM python:3.13-slim
# syntax=docker/dockerfile:1
# check=error=true;experimental=all
FROM python:3.13-slim@sha256:6544e0e002b40ae0f59bc3618b07c1e48064c4faed3a15ae2fbd2e8f663e8283
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
RUN useradd -m botuser && mkdir -p /home/botuser/data
WORKDIR /home/botuser
COPY interactions /home/botuser/interactions
COPY discord_reminder_bot /home/botuser/discord_reminder_bot
RUN --mount=type=cache,target=/root/.cache/uv \
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
uv sync --no-install-project
VOLUME ["/home/botuser/data/"]
CMD ["uv", "run", "python", "-m", "discord_reminder_bot.main"]