Skip to content

fix uv install to fail properly on download errors#196

Merged
bbrowning merged 1 commit into
bbrowning:mainfrom
ktdreyer:dockerfile-uv-install-fix
May 11, 2026
Merged

fix uv install to fail properly on download errors#196
bbrowning merged 1 commit into
bbrowning:mainfrom
ktdreyer:dockerfile-uv-install-fix

Conversation

@ktdreyer
Copy link
Copy Markdown
Contributor

@ktdreyer ktdreyer commented May 5, 2026

  • Podman and Buildah default to OCI image format, which does not support the SHELL Dockerfile instruction (Please support SHELL even in OCI builds containers/buildah#6460). Podman was ignoring SHELL, so pipefail was never active. A failed curl piped into sh could exit zero and produce a broken image.
  • Replace the piped curl | sh with a download-then-execute pattern. Each step in the && chain fails the build independently.

Claude and I have run the following steps

  • make clean && make build completes without the SHELL is not supported for OCI image format warning
  • uv --version works in the built image
  • /tmp/uv-install.sh temp file is cleaned up
  • Changing the URL to a bogus path fails the build at the curl step (exit status 22)

Podman and Buildah default to the OCI image format, which does
not support the SHELL instruction. Podman effectively ignores SHELL, so
"pipefail" was never active. A failed "curl" piped into "sh" could exit
zero and produce a broken image.

Download to a temporary file first, then execute. Each step in
the "&&" chain fails the build independently.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@bbrowning
Copy link
Copy Markdown
Owner

Looks good - thanks!

@bbrowning bbrowning merged commit f9a4a80 into bbrowning:main May 11, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants