Buildx docker-container: Configure BuildKit’s Proxy Environment
A docker-container builder has its own proxy environment, separate from daemon pulls and Dockerfile RUN build arguments.
For a new docker-container builder, put the variables on the BuildKit service:
docker buildx create --name proxy-builder --driver docker-container --driver-opt env.HTTP_PROXY=http://proxy.example:8080 --driver-opt env.HTTPS_PROXY=http://proxy.example:8080
docker buildx build --builder proxy-builder .env.<key> driver options place values inside that builder container. Use an endpoint it can reach; its loopback is not the host terminal. For permitted public registry requests, the HTTP proxy list supplies candidates for the driver’s HTTP proxy URLs.
| Download | Consumer/input |
|---|---|
| Obtain BuildKit image | Docker daemon route |
| Build orchestration/base resolution | BuildKit service driver environment |
| Downloader inside RUN | Step's build environment, including supported proxy arguments |
A build argument cannot reconfigure a running BuildKit process, and its driver environment does not establish the RUN package manager's inputs. Match this pattern to the actual driver/network; remote or integrated builders can use another service configuration.