feat(docker): expose UV_INDEX_URL and NPM_REGISTRY as optional build args#258
Merged
Conversation
smoreinis
approved these changes
Jun 1, 2026
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.
Adds optional Docker build args so images can be built behind networks that block public PyPI / npm and instead mirror the registries via internal proxy (this is the case for Rocket).
Usage:
By default falls back to current behaviour if args are not specified
Greptile Summary
This PR adds optional
UV_INDEX_URLandNPM_REGISTRYbuild args to the Python and UI Dockerfiles respectively, allowing builds behind corporate networks that proxy PyPI and npm through an internal Artifactory mirror. ADOCKER_REGISTRYprefix arg is also added so the base images themselves can be pulled from an internal registry. Default values preserve the existing public-registry behavior when the args are omitted.agentex/Dockerfile: WhenUV_INDEX_URLis non-empty, each install step switches fromuv syncto auv export → uv pip install --index-urltwo-step; theARGis correctly re-declared in every child stage (dev,docs-builder) that uses it, and the production stage is unaffected (it copies pre-built packages frombase).agentex-ui/Dockerfile:NPM_REGISTRYdefaults tohttps://registry.npmjs.org/so no empty-string edge case exists; the value is written to.npmrconly in the builder stage and is never copied into the production image.Confidence Score: 5/5
Safe to merge — changes are purely additive build-time args with safe defaults that leave all existing build paths unchanged.
Both Dockerfiles correctly guard the new code paths: UV_INDEX_URL uses an explicit if [ -n ] check so an empty arg falls through to the unchanged uv sync path, and NPM_REGISTRY carries a non-empty default so no empty-string issue exists for npm. Registry URLs are never written to ENV and are not present in the final production images. ARGs are properly re-declared in each multi-stage FROM boundary. No correctness, security, or runtime concerns were found in the changed code.
No files require special attention.
Important Files Changed
Reviews (4): Last reviewed commit: "Merge branch 'main' into akam/configurab..." | Re-trigger Greptile