Update Dockerfile to specify Python image digest and add support for build checks
This commit is contained in:
11
Dockerfile
11
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 PYTHONUNBUFFERED=1
|
||||||
ENV PYTHONDONTWRITEBYTECODE=1
|
ENV PYTHONDONTWRITEBYTECODE=1
|
||||||
|
|
||||||
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
|
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
|
||||||
|
|
||||||
RUN useradd -m botuser && mkdir -p /home/botuser/data
|
RUN useradd -m botuser && mkdir -p /home/botuser/data
|
||||||
WORKDIR /home/botuser
|
WORKDIR /home/botuser
|
||||||
|
|
||||||
COPY interactions /home/botuser/interactions
|
COPY interactions /home/botuser/interactions
|
||||||
COPY discord_reminder_bot /home/botuser/discord_reminder_bot
|
COPY discord_reminder_bot /home/botuser/discord_reminder_bot
|
||||||
|
|
||||||
RUN --mount=type=cache,target=/root/.cache/uv \
|
RUN --mount=type=cache,target=/root/.cache/uv \
|
||||||
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
|
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
|
||||||
uv sync --no-install-project
|
uv sync --no-install-project
|
||||||
|
|
||||||
VOLUME ["/home/botuser/data/"]
|
VOLUME ["/home/botuser/data/"]
|
||||||
CMD ["uv", "run", "python", "-m", "discord_reminder_bot.main"]
|
CMD ["uv", "run", "python", "-m", "discord_reminder_bot.main"]
|
||||||
|
Reference in New Issue
Block a user