From 1c31444611eee5b7498e16bde7976d252bb4d824 Mon Sep 17 00:00:00 2001 From: Dirk Riemann Date: Sat, 18 Apr 2026 12:32:44 +0200 Subject: [PATCH] fix(docker): install uv via standalone installer (no system pip) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Python 3.12 from deadsnakes on Ubuntu 22.04 drops `distutils` from the stdlib, and Ubuntu's system pip still imports from it — so `pip install` fails immediately with ModuleNotFoundError: distutils. Switch to the uv standalone installer, which doesn't need pip at all. Caught during the first deploy build. Co-Authored-By: Claude Opus 4.7 (1M context) --- Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8ecc39f..2642281 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,7 +30,6 @@ RUN apt-get update \ python3.12 \ python3.12-venv \ python3.12-dev \ - python3-pip \ libmagic1 \ libgl1 \ libglib2.0-0 \ @@ -40,8 +39,10 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* # --- uv (dependency resolver used by the project) ----------------------- -RUN python -m pip install --upgrade pip \ - && python -m pip install "uv>=0.4" +# Install via the standalone installer; avoids needing a working system pip +# (python3.12 on Ubuntu 22.04 has no `distutils`, which breaks Ubuntu pip). +RUN curl -LsSf https://astral.sh/uv/install.sh | sh \ + && ln -sf /root/.local/bin/uv /usr/local/bin/uv WORKDIR /app -- 2.45.2