add uv package manager and use it to build container

This commit is contained in:
2026-01-06 13:35:55 +01:00
parent c458219125
commit 8ea9cbdcee
4 changed files with 318 additions and 4 deletions
+4 -4
View File
@@ -1,13 +1,13 @@
FROM python:alpine
FROM ghcr.io/astral-sh/uv:python3.13-trixie-slim
RUN apk add --no-cache build-base
# RUN apk add --no-cache build-base
# Install app
COPY . /app
WORKDIR /app
# Install dependencies
RUN pip install --upgrade pip && pip install -r requirements.txt
RUN uv sync --no-config --frozen --compile-bytecode
# Run Battlesnake
CMD [ "python", "main.py" ]
CMD ["uv", "run", "main.py"]