This was raised in the comments on the blog post about creating Docker images. I think it should be possible to get it to work by passing HTTP_PROXY or HTTPS_PROXY environment variables into the builder. We should explore the possibility of setting those automatically based on the proxy settings that Gradle or Maven are using.

Comment From: wilkinsona

In the light of #20538, this is probably a bit more complex than I had first realised. If the user has configured DOCKER_HOST, the Docker daemon may be running in an environment where the user's local proxy settings aren't applicable. Perhaps we should only try to pass the local proxy configuration into the builder when DOCKER_HOST has not been set.

Comment From: wilkinsona

There are too many edges cases here for us to be able to reliably configure the current proxy settings. Rather than trying to guess and cause hard to diagnose problems when we get it wrong, we should document how users can configure things themselves.