@@ -840,42 +840,49 @@ $ docker run -it --add-host host.docker.internal:host-gateway \
840
840
PING host.docker.internal (2001:db8::1111): 56 data bytes
841
841
```
842
842
843
- ### Enable CDI devices
844
-
845
- > [ !NOTE]
846
- > This is experimental feature and as such doesn't represent a stable API.
847
- >
848
- > This feature isn't enabled by default. To this feature, set ` features.cdi ` to
849
- > ` true ` in the ` daemon.json ` configuration file.
843
+ ### Configure CDI devices
850
844
851
845
Container Device Interface (CDI) is a
852
846
[ standardized] ( https://github.com/cncf-tags/container-device-interface/blob/main/SPEC.md )
853
847
mechanism for container runtimes to create containers which are able to
854
848
interact with third party devices.
855
849
850
+ CDI is currently only supported for Linux containers and is enabled by default
851
+ since Docker Engine 28.3.0.
852
+
856
853
The Docker daemon supports running containers with CDI devices if the requested
857
854
device specifications are available on the filesystem of the daemon.
858
855
859
- The default specification directors are:
856
+ The default specification directories are:
860
857
861
858
- ` /etc/cdi/ ` for static CDI Specs
862
859
- ` /var/run/cdi ` for generated CDI Specs
863
860
864
- Alternatively, you can set custom locations for CDI specifications using the
861
+ #### Set custom locations
862
+
863
+ To set custom locations for CDI specifications, use the
865
864
` cdi-spec-dirs ` option in the ` daemon.json ` configuration file, or the
866
- ` --cdi-spec-dir ` flag for the ` dockerd ` CLI.
865
+ ` --cdi-spec-dir ` flag for the ` dockerd ` CLI:
867
866
868
867
``` json
869
868
{
870
- "features" : {
871
- "cdi" : true
872
- },
873
869
"cdi-spec-dirs" : [" /etc/cdi/" , " /var/run/cdi" ]
874
870
}
875
871
```
876
872
877
- When CDI is enabled for a daemon, you can view the configured CDI specification
878
- directories using the ` docker info ` command.
873
+ You can view the configured CDI specification directories using the ` docker info ` command.
874
+
875
+ #### Disable CDI devices
876
+
877
+ The feature in enabled by default. To disable it, use the ` cdi ` options in the ` deamon.json ` file:
878
+
879
+ ``` json
880
+ "features" : {
881
+ "cdi" : false
882
+ },
883
+ ```
884
+
885
+ To check the status of the CDI devices, run ` docker info ` .
879
886
880
887
#### Daemon logging format {#log-format}
881
888
0 commit comments