Skip to content

Commit e582882

Browse files
committed
Pin uv docker image by sha/fix uv cp location
1 parent 3284388 commit e582882

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ ENV LC_ALL=C.UTF-8 \
1111
PYTHONFAULTHANDLER=1 \
1212
PYTHONUNBUFFERED=1
1313

14+
# This cannot be inlined below (e.g., COPY --from=...) because Dependabot does not support that syntax yet
15+
FROM ghcr.io/astral-sh/uv:0.8.15@sha256:a5727064a0de127bdb7c9d3c1383f3a9ac307d9f2d8a391edc7896c54289ced0 AS uv
16+
1417
FROM base AS builder
1518

1619
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
@@ -39,7 +42,7 @@ ENV UV_COMPILE_BYTECODE=0 \
3942

4043
WORKDIR /build
4144

42-
COPY --from=ghcr.io/astral-sh/uv:0.8.14 /uv /uvx /bin/
45+
COPY --link --from=uv /uv /uvx /usr/local/bin/
4346

4447
COPY --link pyproject.toml uv.lock /build/
4548

@@ -85,6 +88,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
8588
tini \
8689
&& mkdir /app \
8790
&& chown ubuntu:ubuntu /app
91+
8892
# In the "deployment" build, these `uv` binaries will be 0 bytes.
8993
# In the "test" build they're the actual `uv` tools.
9094
COPY --from=builder --link /usr/local/bin/uv* /usr/local/bin/

0 commit comments

Comments
 (0)