Skip to content

Commit 28f19a9

Browse files
authored
Merge pull request docker#6162 from ArthurFlag/ENGDOCS-2807-cdi-docs-update
docs: cdi isn't experimental
2 parents 219e5ca + 7e040d9 commit 28f19a9

File tree

2 files changed

+25
-19
lines changed

2 files changed

+25
-19
lines changed

docs/reference/commandline/container_run.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -937,15 +937,14 @@ PS C:\> docker run --device=class/86E0D1E0-8089-11D0-9CE4-08003E301F73 mcr.micro
937937
938938
#### CDI devices
939939

940-
> [!NOTE]
941-
> The CDI feature is experimental, and potentially subject to change.
942-
> CDI is currently only supported for Linux containers.
943-
944940
[Container Device Interface
945941
(CDI)](https://github.com/cncf-tags/container-device-interface/blob/main/SPEC.md)
946942
is a standardized mechanism for container runtimes to create containers which
947943
are able to interact with third party devices.
948944

945+
CDI is currently only supported for Linux containers and is enabled by default
946+
since Docker Engine 28.3.0.
947+
949948
With CDI, device configurations are declaratively defined using a JSON or YAML
950949
file. In addition to enabling the container to interact with the device node,
951950
it also lets you specify additional configuration for the device, such as

docs/reference/dockerd.md

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -840,42 +840,49 @@ $ docker run -it --add-host host.docker.internal:host-gateway \
840840
PING host.docker.internal (2001:db8::1111): 56 data bytes
841841
```
842842

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
850844

851845
Container Device Interface (CDI) is a
852846
[standardized](https://github.com/cncf-tags/container-device-interface/blob/main/SPEC.md)
853847
mechanism for container runtimes to create containers which are able to
854848
interact with third party devices.
855849

850+
CDI is currently only supported for Linux containers and is enabled by default
851+
since Docker Engine 28.3.0.
852+
856853
The Docker daemon supports running containers with CDI devices if the requested
857854
device specifications are available on the filesystem of the daemon.
858855

859-
The default specification directors are:
856+
The default specification directories are:
860857

861858
- `/etc/cdi/` for static CDI Specs
862859
- `/var/run/cdi` for generated CDI Specs
863860

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
865864
`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:
867866

868867
```json
869868
{
870-
"features": {
871-
"cdi": true
872-
},
873869
"cdi-spec-dirs": ["/etc/cdi/", "/var/run/cdi"]
874870
}
875871
```
876872

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`.
879886

880887
#### Daemon logging format {#log-format}
881888

0 commit comments

Comments
 (0)