Skip to content

Improve UX around http-proxy for those in corporate environment #30323

@alexellis

Description

@alexellis

Description

ADP runs a typical corporate firewall ala Blue Coat proxy which means there is no direct internet access or transparent proxy available. Docker for Mac helps with this but most machines which need Docker are running Linux or Windows 7.

  • I would like to have a concise way of setting a http-proxy override for the daemon to enable pulling from the Hub registry (without having to locate and hack the systemd unit file). This can be tricky for some people.

  • I would like to have a way of setting a one-time environmental variable or dotfile to configure proxy as per git, npm and bower. It would be explicitly honoured by all docker build commands. The --build-arg override is useful but overly verbose when specifying both http/https and arduous to type over and over. This has to be explained continually so improving the UX would be a time saver.

Steps to reproduce the issue:

Scenario 1.

docker pull nginx:latest

Scenario 2.

docker build -t mycontainer .

Describe the results you received:

Scenario 1.

Cannot dial 52....

Scenario 2.

apt-get timed out reaching server debian.org

Describe the results you expected:

Scenario 1.

Instead of hacking the systemd file, I'd rather the daemon could be more easily altered - perhaps in daemon.json? A cli command would be great, but I think this might be out of place for the CLI.

Scenario 2.

Instead of `docker build --build-arg http_proxy=$http_proxy --build-arg https_proxy=$https_proxy mycontainer . I'd like to be able to do a one-time command that would affect a dotfile such as:

docker config proxy $http_proxy
docker config https.proxy $https_proxy

Other tools that work this way: git, bower, npm:

https://docs.npmjs.com/misc/config

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions