From 480b36ad854c20e3bdf62a4823e4c7a41b3c68a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Hells=C3=A9n?= Date: Fri, 4 Jul 2025 05:58:36 +0200 Subject: [PATCH] Update Dockerfile to specify Python image digest and add support for build checks --- Dockerfile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 12ef6a3..c17f655 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"]