Skip to content

Commit c846428

Browse files
committed
docs: update dockerd usage output for new proxy-options
Adds documentation for the options that were added in moby/moby@427c7cc Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent c730a8e commit c846428

3 files changed

Lines changed: 48 additions & 10 deletions

File tree

docs/reference/commandline/dockerd.md

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ redirect_from:
1818
# daemon
1919

2020
```markdown
21-
Usage: dockerd COMMAND
21+
Usage: dockerd [OPTIONS]
2222

2323
A self-sufficient runtime for containers.
2424

@@ -35,14 +35,14 @@ Options:
3535
--containerd-namespace string Containerd namespace to use (default "moby")
3636
--containerd-plugins-namespace string Containerd namespace to use for plugins (default "plugins.moby")
3737
--cpu-rt-period int Limit the CPU real-time period in microseconds for the
38-
parent cgroup for all containers
38+
parent cgroup for all containers (not supported with cgroups v2)
3939
--cpu-rt-runtime int Limit the CPU real-time runtime in microseconds for the
40-
parent cgroup for all containers
40+
parent cgroup for all containers (not supported with cgroups v2)
4141
--cri-containerd start containerd with cri
4242
--data-root string Root directory of persistent Docker state (default "/var/lib/docker")
4343
-D, --debug Enable debug mode
4444
--default-address-pool pool-options Default address pools for node specific local networks
45-
--default-cgroupns-mode string Default mode for containers cgroup namespace ("host" | "private") (default "host")
45+
--default-cgroupns-mode string Default mode for containers cgroup namespace ("host" | "private") (default "private")
4646
--default-gateway ip Container default gateway IPv4 address
4747
--default-gateway-v6 ip Container default gateway IPv6 address
4848
--default-ipc-mode string Default mode for containers ipc ("shareable" | "private") (default "private")
@@ -62,15 +62,17 @@ Options:
6262
-H, --host list Daemon socket(s) to connect to
6363
--host-gateway-ip ip IP address that the special 'host-gateway' string in --add-host resolves to.
6464
Defaults to the IP address of the default bridge
65+
--http-proxy string HTTP proxy URL to use for outgoing traffic
66+
--https-proxy string HTTPS proxy URL to use for outgoing traffic
6567
--icc Enable inter-container communication (default true)
6668
--init Run an init in the container to forward signals and reap processes
6769
--init-path string Path to the docker-init binary
6870
--insecure-registry list Enable insecure registry communication
6971
--ip ip Default IP when binding container ports (default 0.0.0.0)
7072
--ip-forward Enable net.ipv4.ip_forward (default true)
7173
--ip-masq Enable IP masquerading (default true)
74+
--ip6tables Enable addition of ip6tables rules (experimental)
7275
--iptables Enable addition of iptables rules (default true)
73-
--ip6tables Enable addition of ip6tables rules (default false)
7476
--ipv6 Enable IPv6 networking
7577
--label list Set key=value labels to the daemon
7678
--live-restore Enable live restore of docker when containers are still running
@@ -81,9 +83,10 @@ Options:
8183
--max-concurrent-uploads int Set the max concurrent uploads (default 5)
8284
--max-download-attempts int Set the max download attempts for each pull (default 5)
8385
--metrics-addr string Set default address and port to serve the metrics api on
84-
--mtu int Set the containers network MTU
86+
--mtu int Set the containers network MTU (default 1500)
8587
--network-control-plane-mtu int Network Control plane MTU (default 1500)
8688
--no-new-privileges Set no-new-privileges by default for new containers
89+
--no-proxy string Comma-separated list of hosts or IP addresses for which the proxy is skipped
8790
--node-generic-resource list Advertise user-defined resource
8891
--oom-score-adjust int Set the oom_score_adj for the daemon
8992
-p, --pidfile string Path to use for daemon PID file (default "/var/run/docker.pid")
@@ -143,6 +146,28 @@ by the `dockerd` command line:
143146

144147
## Examples
145148

149+
### Proxy configuration
150+
151+
> **Note**
152+
>
153+
> Refer to the [Docker Desktop manual](https://docs.docker.com/desktop/networking/#httphttps-proxy-support)
154+
> if you are running [Docker Desktop](https://docs.docker.com/desktop/).
155+
156+
If you are behind an HTTP proxy server, for example in corporate settings,
157+
you may have to configure the Docker daemon to use the proxy server for
158+
operations such as pulling and pushing images. The daemon can be configured
159+
in three ways:
160+
161+
1. Using environment variables (`HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY`).
162+
2. Using the "http-proxy", "https-proxy", and "no-proxy" fields in the
163+
[daemon configuration file](#daemon-configuration-file) (Docker Engine 23.0 or newer).
164+
3. Using the `--http-proxy`, `--https-proxy`, and `--no-proxy` command-line
165+
options. (Docker Engine 23.0 or newer).
166+
167+
The command-line and configuration file options take precedence over environment
168+
variables. Refer to [control and configure Docker with systemd](https://docs.docker.com/config/daemon/systemd/#httphttps-proxy)
169+
to set these environment variables on a host using `systemd`.
170+
146171
### Daemon socket option
147172

148173
The Docker daemon can listen for [Docker Engine API](https://docs.docker.com/engine/api/)
@@ -1226,6 +1251,9 @@ This is a full example of the allowed configuration options on Linux:
12261251
"fixed-cidr-v6": "",
12271252
"group": "",
12281253
"hosts": [],
1254+
"http-proxy": "http://proxy.example.com:80",
1255+
"https-proxy": "https://proxy.example.com:443",
1256+
"no-proxy": "*.test.example.com,.example.org",
12291257
"icc": false,
12301258
"init": false,
12311259
"init-path": "/usr/libexec/docker-init",

docs/reference/commandline/pull.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,8 @@ use `docker pull`.
3434

3535
If you are behind an HTTP proxy server, for example in corporate settings,
3636
before open a connect to registry, you may need to configure the Docker
37-
daemon's proxy settings, using the `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY`
38-
environment variables. To set these environment variables on a host using
39-
`systemd`, refer to the [control and configure Docker with systemd](https://docs.docker.com/config/daemon/systemd/#httphttps-proxy)
40-
for variables configuration.
37+
daemon's proxy settings, refer to the [dockerd command-line reference](dockerd.md#proxy-configuration)
38+
for details.
4139

4240
### Concurrent downloads
4341

man/dockerd.8.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ dockerd - Enable daemon mode
3535
[**-G**|**--group**[=*docker*]]
3636
[**-H**|**--host**[=*[]*]]
3737
[**--help**]
38+
[**--http-proxy**[*""*]]
39+
[**--https-proxy**[*""*]]
3840
[**--icc**[=*true*]]
3941
[**--init**[=*false*]]
4042
[**--init-path**[=*""*]]
@@ -54,6 +56,7 @@ dockerd - Enable daemon mode
5456
[**--max-concurrent-downloads**[=*3*]]
5557
[**--max-concurrent-uploads**[=*5*]]
5658
[**--max-download-attempts**[=*5*]]
59+
[**--no-proxy**[*""*]]
5760
[**--node-generic-resources**[=*[]*]]
5861
[**-p**|**--pidfile**[=*/var/run/docker.pid*]]
5962
[**--raw-logs**]
@@ -233,6 +236,12 @@ unix://[/path/to/socket] to use.
233236
**--help**
234237
Print usage statement
235238

239+
**--http-proxy***""*
240+
Proxy URL for HTTP requests unless overridden by NoProxy.
241+
242+
**--https-proxy***""*
243+
Proxy URL for HTTPS requests unless overridden by NoProxy.
244+
236245
**--icc**=*true*|*false*
237246
Allow unrestricted inter\-container and Docker daemon host communication. If
238247
disabled, containers can still be linked together using the **--link** option
@@ -325,6 +334,9 @@ unix://[/path/to/socket] to use.
325334
**--max-download-attempts**=*5*
326335
Set the max download attempts for each pull. Default is `5`.
327336

337+
**--no-proxy**=*""*"
338+
Comma-separated values specifying hosts that should be excluded from proxying.
339+
328340
**--node-generic-resources**=*[]*
329341
Advertise user-defined resource. Default is `[]`.
330342
Use this if your swarm cluster has some nodes with custom

0 commit comments

Comments
 (0)