Repository navigation
Conversation
Copy uv from ghcr.io/astral-sh/uv instead of piping astral.sh/uv/install.sh into sh, in both the backend image and the lake-builder image. The version is now fixed and visible to Dependabot through the FROM line. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: DoDiODev <DoDiDev@proton.me>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pr-type/bug-fix,pr-type/feature-development, etc.(I can't set labels myself; suggested:
pr-type/refactor,component/devops)Summary
Both
backend/Dockerfileanddevops/docker/lake-builder/Dockerfileinstalluv with
curl -LsSf https://astral.sh/uv/install.sh | sh. That always pullswhatever uv release is newest at build time, so two builds of the same commit
can ship different uv versions, and Dependabot cannot see or update it.
This PR copies uv from the official
ghcr.io/astral-sh/uvimage instead, asrecommended in the uv Docker guide:
FROM ghcr.io/astral-sh/uv:0.13.7 as uvin each Dockerfile.Dependabot's docker ecosystem (already configured for
/backendand/devops/docker/lake-builder) readsFROMlines, but notCOPY --from=<image>, so the version is pinned through a stage.COPY --from=uv --chown=devlake:0 /uv /uvx /app/.local/bin/—same location and owner as before; placed after the existing
chgrp/chmodso it does not add a second layer with the binaries.COPY --from=uv /uv /uvx /usr/local/bin/— same location as before.--platform, so the binaries match the target platform.No version change in practice: 0.13.7 is the current uv release.
Note: once merged, the lake-builder image needs a new
builder-v*tag to bepublished.
Does this close any open issues?
N/A
Screenshots
N/A
Other Information
Validation:
docker build --target base -t devlake-uvpin-base backend(linux/arm64): OK;all four Python plugins built (
azuredevops,glpi,redmine,zephyr).docker run --rm devlake-uvpin-base uv --version:uv 0.13.7;uvx --version:uvx 0.13.7;/app/.local/bin/uvowned bydevlake:0.docker run --rm -u 123456:0 -e HOME=/tmp devlake-uvpin-base sh -c 'uv venv /tmp/v --python 3.11':OK (arbitrary UID, as on OpenShift).
docker build --platform linux/amd64 -t devlake-uvpin-builder devops/docker/lake-builder: OK;uv --versionin the image:uv 0.13.7 (x86_64-unknown-linux-musl),/usr/local/bin/uv.