Open
Description
Description
I setup docker build behind proxy. I have to have proxy settings in 3 (!!!) places:
- Docker daemon. I created file /etc/systemd/system/docker.service.d/docker_proxy.conf as it's described in documentation.
- '--build-arg's for docker build cli run.
- 'http_proxy' and 'https_proxy' environment variable for docker build. Without this 'docker build' cli hangs as it's impossible to connect directly. It fails after some time with error 'ERROR: failed to solve: XXX: failed to authorize: failed to fetch anonymous token: Get "https://auth.docker.io/token?scope...": dial tcp 44.205.64.79:443: i/o timeout'.
For me proper cli is http_proxy=.... https_proxy=... docker build --build-arg http_proxy=.... --build-arg https_proxy=.... -t ...
So, proper proxy setup consists of settings in 3(!!!!) places. And it's just docker's options. After that I need to set proper apt's proxy config for installing necessary software in container image. And additional arguments for gradle for building java application.
I strictly believe current number of settings could drive of the wall anybody. I'd like to have proxy settings in 1 (ONE!) place, not in three places.