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.
This commit is contained in:
konsti 2024-08-27 18:03:55 +02:00 committed by GitHub
parent 5d5e06c0e6
commit 18453ae79f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 11 additions and 0 deletions

View File

@ -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,