feat: support custom package index (UV_DEFAULT_INDEX) for Container builds#453
Merged
feat: support custom package index (UV_DEFAULT_INDEX) for Container builds#453
Conversation
Enterprise customers using internal artifact repositories instead of public PyPI can now configure custom uv index URLs in ~/.agentcore/config.json. The CLI forwards these as Docker build args during container image builds (dev, package, deploy).
Contributor
Coverage Report
|
3fc1322 to
20692cb
Compare
tejaskash
previously approved these changes
Feb 25, 2026
…uilds Enterprise customers using internal artifact repositories instead of public PyPI can now configure custom uv index URLs in ~/.agentcore/config.json. The CLI forwards these as Docker build args during container image builds (dev, package, deploy).
20692cb to
353afc1
Compare
tejaskash
approved these changes
Feb 25, 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.
Description
Enterprise customers that enforce internal artifact repositories (instead of public PyPI) cannot build Container agents because
uv syncin the Dockerfile defaults to PyPI. This PR adds support for configuring custom uv package index URLs via~/.agentcore/config.json, which the CLI forwards as Docker--build-argflags during all container image builds.Uses the current (non-deprecated) uv environment variables
UV_DEFAULT_INDEXandUV_INDEXper uv docs.Configuration: Users add their index URLs once to
~/.agentcore/config.json:{ "uvDefaultIndex": "https://my-enterprise-repo/simple", "uvIndex": "https://another-repo/simple" }How it works:
readCliConfig()utility reads~/.agentcore/config.json(silently returns empty object if missing/malformed)getUvBuildArgs()helper converts config into--build-arg UV_DEFAULT_INDEX=...flagsARG UV_DEFAULT_INDEX/ARG UV_INDEXand sets them asENVso alluvcommands respect themWhen no config is present, build args are empty and uv falls back to PyPI — fully backward-compatible.
Related Issue
Closes #
Documentation PR
N/A
Type of Change
Testing
How have you tested the change?
npm run test:unitandnpm run test:integnpm run typechecknpm run lintsrc/assets/, I rannpm run test:update-snapshotsand committed the updated snapshotsManual testing:
agentcore devbuilds and runs Container agent successfully using default PyPIuvDefaultIndex: "https://pypi.org/simple"): Full end-to-end build succeeds;docker inspectconfirmsUV_DEFAULT_INDEX=https://pypi.org/simpleis set in the built imageChecklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.