@@ -57,6 +57,7 @@ Options:
5757 --exec-opt list Runtime execution options
5858 --exec-root string Root directory for execution state files (default "/var/run/docker")
5959 --experimental Enable experimental features
60+ --feature map Enable feature in the daemon
6061 --fixed-cidr string IPv4 subnet for fixed IPs
6162 --fixed-cidr-v6 string IPv6 subnet for fixed IPs
6263 -G, --group string Group for the unix socket (default "docker")
@@ -971,6 +972,36 @@ Example of usage:
971972}
972973```
973974
975+ ### <a name =" feature " ></a > Enable feature in the daemon (--feature)
976+
977+ The ` --feature ` option lets you enable or disable a feature in the daemon.
978+ This option corresponds with the "features" field in the [ daemon.json configuration file] ( #daemon-configuration-file ) .
979+ Features should only be configured either through the ` --feature ` command line
980+ option or through the "features" field in the configuration file; using both
981+ the command-line option and the "features" field in the configuration
982+ file produces an error. The feature option can be specified multiple times
983+ to configure multiple features. The ` --feature ` option accepts a name and
984+ optional boolean value. When omitting the value, the default is ` true ` .
985+
986+ The following example runs the daemon with the ` cdi ` and ` containerd-snapshotter `
987+ features enabled. The ` cdi ` option is provided with a value;
988+
989+ ``` console
990+ $ dockerd --feature cdi=true --feature containerd-snapshotter
991+ ```
992+
993+ The following example is the equivalent using the ` daemon.json ` configuration
994+ file;
995+
996+ ``` json
997+ {
998+ "features" : {
999+ "cdi" : true ,
1000+ "containerd-snapshotter" : true
1001+ }
1002+ }
1003+ ```
1004+
9741005### Daemon configuration file
9751006
9761007The ` --config-file ` option allows you to set any configuration option
@@ -1065,7 +1096,10 @@ The following is a full example of the allowed configuration options on Linux:
10651096 "exec-opts" : [],
10661097 "exec-root" : " " ,
10671098 "experimental" : false ,
1068- "features" : {},
1099+ "features" : {
1100+ "cdi" : true ,
1101+ "containerd-snapshotter" : true
1102+ },
10691103 "fixed-cidr" : " " ,
10701104 "fixed-cidr-v6" : " " ,
10711105 "group" : " " ,
0 commit comments