From 18453ae79fa6bf99c9a37f4fa5dccd2b5268e482 Mon Sep 17 00:00:00 2001 From: konsti Date: Tue, 27 Aug 2024 18:03:55 +0200 Subject: [PATCH] Add note about install python on alpine (#6677) When not using a python base image and using alpine, you need to install python by yourself. You should also pin the python version when doing so; currently, i see only python 3.12 in the alpine repository. --- docs/guides/integration/docker.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/guides/integration/docker.md b/docs/guides/integration/docker.md index d61d544b6ecd..3edbd317072f 100644 --- a/docs/guides/integration/docker.md +++ b/docs/guides/integration/docker.md @@ -141,6 +141,17 @@ $ docker run -it $(docker build -q .) /bin/bash -c "cowsay -t hello" ENV UV_TOOL_BIN_DIR=/opt/uv-bin/ ``` +### Installing Python in musl-based images + +While uv [installs a compatible Python version](../install-python.md) if there isn't one available +in the image, uv does not yet support installing Python for musl-based distributions. For example, +if you are using an Alpine Linux base image that doesn't have Python installed, you need to add it +with the system package manager: + +```shell +apk add --no-cache python3~=3.12 +``` + ## Developing in a container When developing, it's useful to mount the project directory into a container. With this setup,