buildx is does not respect the no_proxy variable
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 4.5k
- Forks
- 682
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 29
Description
I am using buildx to build multi-arch containers. After setting up a builder and configuring the system environment variables to use a proxy as well as handing over the proxy and no_proxy variables to the builder instance the 'buildx build' command does not respect the no_proxy or NO_PROXY environment variable when using the --push parameter.
docker buildx create --use --name arm64-builder --driver=docker-container --driver-opt env.http_proxy=$http_proxy --driver-opt env.https_proxy=$https_proxy --driver-opt env.no_proxy=$no_proxy
docker buildx build --builder arm64-builder --platform linux/amd64,linux/arm64/v8 --tag "$CONTAINER_IMAGE" --push . ;
As i am behind a corporate proxy I need to set the proxy variables to be able to access repositories on the internet, but the private image repository is only available within the corporate network. Therefore I need to set the no_proxy/NO_PROXY variables.
But it seems that the build --push command does not make use of the no_proxy and tries to reach the private container repo via public internet, which fails.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the docker buildx create and docker buildx build --push commands with proxy and no_proxy variables, then trace how proxy settings reach the push path. Done means private registries in no_proxy bypass the proxy while external repositories continue using it, with a regression test covering the behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100