mirror of
https://github.com/kvcache-ai/AgentENV.git
synced 2026-11-05 01:17:36 +00:00
[PR #113] build: forward proxy settings into the container image builds #188
Labels
No labels
bug
documentation
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/AgentENV#188
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/kvcache-ai/AgentENV/pull/113
Author: @cleverhu
Created: 8/3/2026
Status: 🔄 Open
Base:
main← Head:build/docker-proxy-passthrough📝 Commits (1)
6fa4e15build: forward proxy settings into the container image builds📊 Changes
4 files changed (+36 additions, -5 deletions)
View changed files
📝
Cargo.toml(+3 -1)📝
Makefile(+20 -3)📝
deploy/docker-compose.yml(+6 -0)📝
deploy/docker/Dockerfile.agentenv(+7 -1)📄 Description
What
Forward the caller's proxy environment into the container image builds from both
make k8s-buildand docker compose, and enable reqwest'ssocksfeature.Why
The
--setup-onlylayer ofDockerfile.agentenvdownloads regctl, firecracker, the kernel, the overlaybd package and the ghcr.io tools image. Behind a restricted network that is by far the slowest part of a cold build, and there was no way to point it at a proxy short of editing the Dockerfile.The
socksfeature is needed because reqwest reads the standard proxy environment variables but silently ignoressocks5://values when the feature is off. A build that appears to honourHTTPS_PROXYthen goes direct and hangs, with no diagnostic.Related issue
None; build-time developer experience.
Scope and non-goals
Included: proxy passthrough in the Makefile, docker compose and a Dockerfile comment, plus the reqwest feature.
Explicitly excluded, because they were part of the same internal change but are site-specific:
--pushtok8s-build.APT_MIRROR_BASEto a regional mirror. It stays empty.Design and behavior changes
DOCKER_PROXY_ARGSis assembled fromHTTP_PROXY/HTTPS_PROXY/ALL_PROXY/NO_PROXY, each defaulting to its lowercase counterpart. Both spellings are passed through because Go and Rust HTTP clients differ in which they look up. Unset variables expand to nothing, so with no proxy exported the build commands are byte-for-byte what they are today.These four are predefined BuildKit build args. Passing them with
--build-argmakes them available to every stage'sRUNwithout anARGdeclaration, and keeps them out of the image environment,docker history, and the layer cache key — which matters because a proxy URL often carries credentials. The Dockerfile comment records this, since declaringARGexplicitly would scope them to a single stage and leave thedeps-stagedownloads on a direct connection, which is the opposite of the intent.docker-compose.ymlforwards the same four to the agentenv build.Compatibility and operations
sockspulls in reqwest's SOCKS support;Cargo.lockneeds no update andcargo metadata --lockedstill passes.Validation
make fmtmake clippymake test-unitmake -C services test(required whenservices/changes)maketargetCommands and results:
Skipped checks and reasons:
make test-unitnot run: the only Rust change is a Cargo feature flag, covered by a full--all-targetsclippy build.make k8s-buildwas not executed here; the passthrough is verified withmake -nin both the proxy and no-proxy cases, and the equivalent change has been used to build these images behind a SOCKS proxy internally.Risks and reviewer notes
The no-proxy path is the one to check, since it affects everyone:
make -noutput above confirms the commands are unchanged apart from whitespace when no variable is exported.Second point for review: proxy URLs frequently embed credentials. Using the predefined BuildKit args rather than declaring
ARGkeeps them out of the image and out ofdocker history; if maintainers would rather not accept proxy values through the Makefile at all, the compose and Dockerfile parts still stand on their own.Most important file:
Makefile.Checklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.