Skip to content

Commit cde0a0d

Browse files
committed
Fix Dockerfile installing uv
1 parent c08c577 commit cde0a0d

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

Dockerfile

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
1-
# The devcontainer should use the developer target and run as root with podman
2-
# or docker with user namespaces.
1+
# Use this version of Python
32
ARG PYTHON_VERSION=3.12
4-
FROM python:${PYTHON_VERSION} AS developer
5-
63
# Use this version of uv
74
ARG UV_VERSION=0.7
85

6+
# Install uv using the official image
7+
# See https://docs.astral.sh/uv/guides/integration/docker/#installing-uv
8+
FROM ghcr.io/astral-sh/uv:${UV_VERSION} as uv-distroless
9+
10+
# The devcontainer should use the developer target and run as root with podman
11+
# or docker with user namespaces.
12+
FROM python:${PYTHON_VERSION} AS developer
13+
914
# Add any system dependencies for the developer/build environment here
1015
# RUN apt-get update && apt-get install -y --no-install-recommends \
1116
# graphviz
1217

13-
# Install uv using the official image
14-
# See https://docs.astral.sh/uv/guides/integration/docker/#installing-uv
15-
COPY --from=ghcr.io/astral-sh/uv:${UV_VERSION} /uv /uvx /bin/
18+
# Install from uv image
19+
COPY --from=uv-distroless /uv /uvx /bin/
1620

1721
# The build stage installs the context into the venv
1822
FROM developer AS build

0 commit comments

Comments
 (0)