File tree Expand file tree Collapse file tree 2 files changed +7
-14
lines changed
Expand file tree Collapse file tree 2 files changed +7
-14
lines changed Original file line number Diff line number Diff line change 11FROM python:3.13-slim AS builder
22
3- WORKDIR /install
3+ ENV UV_SYSTEM_PYTHON=1
44
5- COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
5+ WORKDIR /build
66
7- RUN apt-get update && apt-get install -y \
8- gcc \
9- g++ \
10- && rm -rf /var/lib/apt/lists/*
7+ COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
118
129COPY pyproject.toml uv.lock README.md ./
13- COPY app ./app
1410
1511RUN uv sync --frozen --no-dev --no-cache
1612
1713FROM python:3.13-slim AS runtime
1814
1915ENV PYTHONDONTWRITEBYTECODE=1 \
2016 PYTHONUNBUFFERED=1 \
21- PATH="/install /.venv/bin:$PATH"
17+ PATH="/build /.venv/bin:$PATH"
2218
2319WORKDIR /app
2420
25- COPY --from=builder /install/.venv /install/.venv
21+ COPY --from=builder /build/.venv /build/.venv
22+
2623COPY ./app ./app
2724
2825EXPOSE 8000
Original file line number Diff line number Diff line change @@ -2,18 +2,14 @@ FROM python:3.13-slim
22
33COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
44
5- RUN apt-get update && apt-get install -y \
6- gcc \
7- g++ \
8- && rm -rf /var/lib/apt/lists/*
9-
105ENV PYTHONDONTWRITEBYTECODE=1 \
116 PYTHONUNBUFFERED=1 \
127 UV_SYSTEM_PYTHON=1
138
149WORKDIR /
1510
1611COPY pyproject.toml uv.lock README.md ./
12+
1713COPY app ./app
1814
1915RUN uv sync --frozen --no-dev --no-cache
You can’t perform that action at this time.
0 commit comments