-
Notifications
You must be signed in to change notification settings - Fork 682
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Publish variants of Docker image #5610
Comments
For example, this is important for GitLab CI which requires This applies to Ruff as well. |
This should basically be trivial, we just need to setup a folder with a few variants, copy in the executable from the scratch image, and publish them each release. |
When building an optimized production image, i'd need two base images: A builder with uv, my python version and ideally a bunch of dev libraries (curl, git, gcc, dev headers), and a runner image that has python in the same location as the builder, in which i only copy the venv and call |
I think we can describe a few goals here:
|
I can suggest few approach to this:
I can create Dockerfiles quickly for this This will be minimal with no extra apt or system packages |
Later I can think of some CI to automate this: On official release publish these Python version images with UV installed: or as per UV support matrix |
Sure, a couple notes:
|
For example here is the uv image i created based on Python3.9 version: mayuresh14/uv-python39-slim Dockerfile looks like this
I will keep in mind your mentioned notes and create a PR soon |
## Summary Closes #5610 This PR introduces additional images with the uv/uvx binaries from scratch for both amd64/arm64 and make the mapping easy to configure by generating the Dockerfile on the fly. This approach focuses on minimizing CI time by taking advantage of dedicating a worker per mapping (20-30s~ per job). This PR also fixes `org.opencontainers.image.version` for all tags (including the one from `scratch) to contain the right release version instead of branch name `main` (default when no tag patterns are specified). For example, on release `x.y.z`, this will publish the following image tags with format `ghcr.io/astral-sh/uv:{tag}` with manifests for both amd64/arm64. This also include `x.y` tags for each respective additional tag. * From **scratch**: `latest`, `x.y.z`, `x.y` (currently being published) * From **alpine:3.20**: `alpine`, `alpine3.20`, `x.y.z-alpine`, `x.y.z-alpine3.20` * From **debian:bookworm-slim**: `debian-slim`, `bookworm-slim`, `x.y.z-debian-slim`, `x.y.z-bookworm-slim` * From **buildpack-deps:bookworm**: `debian`, `bookworm`, `x.y.z-debian`, `x.y.z-bookworm` * From **python:3.12-alpine**: `python3.12-alpine`, `x.y.z-python3.12-alpine` * From **python:3.11-alpine**: `python3.11-alpine`, `x.y.z-python3.11-alpine` * From **python:3.10-alpine**: `python3.10-alpine`, `x.y.z-python3.10-alpine` * From **python:3.9-alpine**: `python3.9-alpine`, `x.y.z-python3.9-alpine` * From **python:3.8-alpine**: `python3.8-alpine`, `x.y.z-python3.8-alpine` * From **python:3.12-bookworm**: `python3.12-bookworm`, `x.y.z-python3.12-bookworm` * From **python:3.11-bookworm**: `python3.11-bookworm`, `x.y.z-python3.11-bookworm` * From **python:3.10-bookworm**: `python3.10-bookworm`, `x.y.z-python3.10-bookworm` * From **python:3.9-bookworm**: `python3.9-bookworm`, `x.y.z-python3.9-bookworm` * From **python:3.8-bookworm**: `python3.8-bookworm`, `x.y.z-python3.8-bookworm` * From **python:3.12-slim-bookworm**: `python3.12-slim-bookworm`, `x.y.z-python3.12-slim-bookworm` * From **python:3.11-slim-bookworm**: `python3.11-slim-bookworm`, `x.y.z-python3.11-slim-bookworm` * From **python:3.10-slim-bookworm**: `python3.10-slim-bookworm`, `x.y.z-python3.10-slim-bookworm` * From **python:3.9-slim-bookworm**: `python3.9-slim-bookworm`, `x.y.z-python3.9-slim-bookworm` * From **python:3.8-slim-bookworm**: `python3.8-slim-bookworm`, `x.y.z-python3.8-slim-bookworm`
Instead of only supplying a bare image, we should publish an alpine variant and a variant with Python so people can use our image without creating a custom derivative.
The text was updated successfully, but these errors were encountered: