Files
shopping-list-api/Dockerfile
steve-w b2f7d0480a
All checks were successful
CI / test (push) Successful in 5m48s
CI / test (pull_request) Successful in 48s
CI / docker-build (push) Successful in 3m7s
CI / docker-build (pull_request) Successful in 45s
Migrate project to uv and add Docker CI
2026-04-06 16:51:36 +00:00

24 lines
523 B
Docker

FROM python:3.12-slim AS base
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
UV_LINK_MODE=copy \
UV_COMPILE_BYTECODE=1
WORKDIR /app
RUN apt-get update \
&& apt-get install -y --no-install-recommends curl ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY --from=ghcr.io/astral-sh/uv:0.7.22 /uv /uvx /bin/
COPY pyproject.toml uv.lock ./
RUN uv sync --frozen --no-dev
COPY main.py ./
EXPOSE 8000
CMD ["uv", "run", "--no-dev", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]