1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/integration
Sebastiaan van Stijn 101dafd049
daemon/config: move proxy settings to "proxies" struct within daemon.json
This is a follow-up to 427c7cc5f8, which added
proxy-configuration options ("http-proxy", "https-proxy", "no-proxy") to the
dockerd cli and in `daemon.json`.

While working on documentation changes for this feature, I realised that those
options won't be "next" to each-other when formatting the daemon.json JSON, for
example using `jq` (which sorts the fields alphabetically). As it's possible that
additional proxy configuration options are added in future, I considered that
grouping these options in a struct within the JSON may help setting these options,
as well as discovering related options.

This patch introduces a "proxies" field in the JSON, which includes the
"http-proxy", "https-proxy", "no-proxy" options.

Conflict detection continues to work as before; with this patch applied:

    mkdir -p /etc/docker/
    echo '{"proxies":{"http-proxy":"http-config", "https-proxy":"https-config", "no-proxy": "no-proxy-config"}}' > /etc/docker/daemon.json

    dockerd --http-proxy=http-flag --https-proxy=https-flag --no-proxy=no-proxy-flag --validate

    unable to configure the Docker daemon with file /etc/docker/daemon.json:
    the following directives are specified both as a flag and in the configuration file:
    http-proxy: (from flag: http-flag, from file: http-config),
    https-proxy: (from flag: https-flag, from file: https-config),
    no-proxy: (from flag: no-proxy-flag, from file: no-proxy-config)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-04-07 19:43:02 +02:00
..
build Merge pull request #43009 from thaJeztah/skip_TestBuildWCOWSandboxSize 2021-11-10 11:59:09 -08:00
config Add configuration validation option and tests. 2021-06-23 09:54:55 +00:00
container Suport vpci-class-guid in the non-containerd backend 2022-03-27 13:26:47 +11:00
daemon daemon/config: move proxy settings to "proxies" struct within daemon.json 2022-04-07 19:43:02 +02:00
distribution bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-11 00:06:42 +01:00
image Finish refactor of UID/GID usage to a new struct 2022-03-14 16:28:57 -04:00
internal Break out setupWindowsDevices and add tests 2022-03-27 13:23:48 +11:00
network Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
plugin Finish refactor of UID/GID usage to a new struct 2022-03-14 16:28:57 -04:00
secret integration/secret: add check for empty list not producing an error 2020-04-14 18:31:36 +02:00
service Fix race in TestCreateServiceSecretFileMode, TestCreateServiceConfigFileMode 2021-10-27 10:55:54 +02:00
session bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-11 00:06:42 +01:00
system API: add "Swarm" header to _ping endpoint 2022-03-25 23:54:14 +01:00
testdata/https Update test certificates 2021-05-18 09:43:21 +02:00
volume integration: copy loop variable into parallel test closures 2021-07-22 22:46:12 +02:00
doc.go Add canonical import comment 2018-02-05 16:51:57 -05:00