Skip to content

Docker behind proxy - setup nightmare #4501

Open
@RainM

Description

@RainM

Description

I setup docker build behind proxy. I have to have proxy settings in 3 (!!!) places:

  1. Docker daemon. I created file /etc/systemd/system/docker.service.d/docker_proxy.conf as it's described in documentation.
  2. '--build-arg's for docker build cli run.
  3. '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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions