Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation of proxy configuration via config.json does not match the implementation #4686

Closed
somcsel opened this issue Sep 21, 2017 · 1 comment
Assignees
Labels
area/engine Issue affects Docker engine/daemon lifecycle/locked

Comments

@somcsel
Copy link
Contributor

somcsel commented Sep 21, 2017

Problem description

Docker CLI fails to parse its config.json if it contains a proxy configuration object based on the format shown in the documentation:

$ docker version
WARNING: Error loading config file: /home/sl/.docker/config.json - json: cannot unmarshal string into Go struct field ConfigFile.proxies of type configfile.ProxyConfig

Problem location

Project version(s) affected

17.09.0-ce onwards (stable)
17.07.0-ce onwards (edge)

Suggestions for a fix

A suggested fix is uploaded as PR #4687.

The documented JSON proxy configuration structure does not match the implementation in docker/cli#93. The JSON strucuture requires an intermediate object named default in between proxies and the servers. This is because, in addition to the default proxy servers, the cli implementation makes it possible to specify the proxies to use when connnecting to a specific docker daemon, e.g.

    {
      "proxies":
      {
        "default":
        {
          "httpProxy": "http://127.0.0.1:3001",
          "noProxy": "*.test.example.com,.example2.com"
        },
        "tcp://example.docker.com:2376":
        {
          "httpProxy": "http://proxy.intra.mycorp.com:8080",
          "httpsProxy": "http://proxy.intra.mycorp.com:8080",
          "noProxy": "*.intra.mycorp.com"
        }
      }
    }
somcsel pushed a commit to somcsel/docker.github.io that referenced this issue Sep 21, 2017
As per the implementation in docker/cli#93 the proxy server addresses
are specified per docker daemon or as defaults.  Updated the example to
show the default option.

Fixes docker#4686
@gbarr01 gbarr01 added the area/engine Issue affects Docker engine/daemon label Sep 22, 2017
mdlinville pushed a commit that referenced this issue Oct 13, 2017
* Update documentation of proxy server configuration

As per the implementation in docker/cli#93 the proxy server addresses
are specified per docker daemon or as defaults.  Updated the example to
show the default option.

Fixes #4686

* Fix table layout of proxy environment variables
@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

/lifecycle locked

@docker docker locked and limited conversation to collaborators Mar 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/engine Issue affects Docker engine/daemon lifecycle/locked
Projects
None yet
Development

No branches or pull requests

4 participants