Skip to content

Commit b7a7b88

Browse files
committed
Dockerfile update for uv
1 parent 7a89925 commit b7a7b88

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

Dockerfile

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,12 @@ RUN wget --progress=dot:giga -O uwsgi-${_UWSGI_VERSION}.tar.gz https://github.co
1515
#
1616
# Build poetry and export compiled dependecines as plain requirements.txt
1717
#
18-
FROM python:${PYTHON_VERSION}-slim-bookworm AS deps-compile
18+
FROM ghcr.io/astral-sh/uv:0.8.14-alpine AS deps-compile
1919

2020
WORKDIR /
21-
COPY poetry.lock pyproject.toml /
22-
23-
# Version is taken from poetry.lock, assuming it is generated with up-to-date version of poetry
24-
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
25-
RUN pip install --no-cache-dir poetry==$(cat poetry.lock |head -n1|awk -v FS='(Poetry |and)' '{print $2}') \
26-
&& poetry self add poetry-plugin-export \
27-
&& poetry export --format=requirements.txt --without-hashes -o requirements.txt
21+
COPY uv.lock pyproject.toml /
2822

23+
RUN uv export -o /requirements.txt
2924

3025
#
3126
# Base image with django dependecines
@@ -43,7 +38,7 @@ RUN apt-get update \
4338
&& rm -rf /var/lib/apt/lists/*
4439

4540
COPY --from=uwsgi-compile /uwsgi /usr/local/bin/
46-
RUN pip install --no-cache-dir --upgrade pip==24.2
41+
RUN pip install --no-cache-dir --upgrade pip==25.2
4742
COPY --from=deps-compile /requirements.txt /
4843
RUN pip install --no-cache-dir --root-user-action=ignore -r /requirements.txt
4944

0 commit comments

Comments
 (0)