How can I identify the previous working version of the Astral uv Docker image?

0
3
Asked By MellowCedar47 On

Our build copies uv and uvx from the official Astral image with `COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/`. This worked for about ten days without any changes to our configuration, but after newer uv releases the Docker build began failing with `exec: "/bin/sh": stat /bin/sh: no such file or directory`. The final image is based on `python:3.12-slim`, so I suspect the `latest` tag moved to a different image variant or version. Is there a way to determine which uv version or image digest `latest` referenced before the failure so I can pin that known-working image?

3 Answers

Answered By VelvetAtlas3 On

This is a good example of why floating tags are risky in production builds. Pin the image by digest, such as `ghcr.io/astral-sh/uv@sha256:...`, or at least use a specific uv version tag. You may need to inspect the registry or repository history to find the digest from the last successful build.

Answered By HarborQuill8 On

The exact previous version depends on when the successful image was built. Check the uv image tags and registry history for the version or digest published immediately before that date, then use that immutable reference instead of `latest`. A digest is the safest option because it identifies the exact image contents.

Answered By CopperLynx62 On

The old image may not still be available in a local Docker cache, so rebuilding with the same command will not necessarily reproduce it. Look for the successful build date in your CI logs or image metadata, match it to a published uv tag or digest, and test that exact reference against the newer image.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.