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

docs: add documentation for dockerd --feature flag #5436

Merged
merged 4 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 35 additions & 1 deletion docs/reference/dockerd.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Options:
--exec-opt list Runtime execution options
--exec-root string Root directory for execution state files (default "/var/run/docker")
--experimental Enable experimental features
--feature map Enable feature in the daemon
--fixed-cidr string IPv4 subnet for fixed IPs
--fixed-cidr-v6 string IPv6 subnet for fixed IPs
-G, --group string Group for the unix socket (default "docker")
Expand Down Expand Up @@ -971,6 +972,36 @@ Example of usage:
}
```

### <a name="feature"></a> Enable feature in the daemon (--feature)

The `--feature` option lets you enable or disable a feature in the daemon.
This option corresponds with the "features" field in the [daemon.json configuration file](#daemon-configuration-file).
Features should only be configured either through the `--feature` command line
option or through the "features" field in the configuration file; using both
the command-line option and the "features" field in the configuration
file produces an error. The feature option can be specified multiple times
to configure multiple features. The `--feature` option accepts a name and
optional boolean value. When omitting the value, the default is `true`.

The following example runs the daemon with the `cdi` and `containerd-snapshotter`
features enabled. The `cdi` option is provided with a value;

```console
$ dockerd --feature cdi=true --feature containerd-snapshotter
```

The following example is the equivalent using the `daemon.json` configuration
file;

```json
{
"features": {
"cdi": true,
"containerd-snapshotter": true
}
}
```

### Daemon configuration file

The `--config-file` option allows you to set any configuration option
Expand Down Expand Up @@ -1065,7 +1096,10 @@ The following is a full example of the allowed configuration options on Linux:
"exec-opts": [],
"exec-root": "",
"experimental": false,
"features": {},
"features": {
"cdi": true,
"containerd-snapshotter": true
},
"fixed-cidr": "",
"fixed-cidr-v6": "",
"group": "",
Expand Down
9 changes: 9 additions & 0 deletions man/dockerd.8.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ dockerd - Enable daemon mode
[**--exec-opt**[=*[]*]]
[**--exec-root**[=*/var/run/docker*]]
[**--experimental**[=**false**]]
[**--feature**[=*NAME*[=**true**|**false**]]
[**--fixed-cidr**[=*FIXED-CIDR*]]
[**--fixed-cidr-v6**[=*FIXED-CIDR-V6*]]
[**-G**|**--group**[=*docker*]]
Expand Down Expand Up @@ -222,6 +223,14 @@ $ sudo dockerd --add-runtime runc=runc --add-runtime custom=/usr/local/bin/my-ru
**--experimental**=""
Enable the daemon experimental features.

**--feature**=*NAME*[=**true**|**false**]
Enable or disable a feature in the daemon. This option corresponds
with the "features" field in the daemon.json configuration file. Using
both the command-line option and the "features" field in the configuration
file produces an error. The feature option can be specified multiple times
to configure multiple features.
Usage example: `--feature containerd-snapshotter` or `--feature containerd-snapshotter=true`.

**--fixed-cidr**=""
IPv4 subnet for fixed IPs (e.g., 10.20.0.0/16); this subnet must be nested in
the bridge subnet (which is defined by \-b or \-\-bip).
Expand Down
Loading