Add platform specification to Dockerfile base image
This commit is contained in:
10
Dockerfile
10
Dockerfile
@ -1,12 +1,18 @@
|
|||||||
FROM python:3.13-slim
|
FROM --platform=$BUILDPLATFORM python:3.13-slim
|
||||||
|
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
|
||||||
|
|
||||||
ENV PYTHONUNBUFFERED=1
|
ENV PYTHONUNBUFFERED=1
|
||||||
ENV PYTHONDONTWRITEBYTECODE=1
|
ENV PYTHONDONTWRITEBYTECODE=1
|
||||||
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=bind,source=pyproject.toml,target=pyproject.toml \
|
RUN --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", "discord_reminder_bot/main.py"]
|
CMD ["uv", "run", "discord_reminder_bot/main.py"]
|
||||||
|
Reference in New Issue
Block a user