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: tidy up CDI docs #5021

Merged
merged 1 commit into from May 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
28 changes: 15 additions & 13 deletions docs/reference/commandline/container_run.md
Expand Up @@ -902,17 +902,19 @@ PS C:\> docker run --device=class/86E0D1E0-8089-11D0-9CE4-08003E301F73 mcr.micro

> **Note**
>
> This is experimental feature and as such doesn't represent a stable API.
> The CDI feature is experimental, and potentially subject to change.
> CDI is currently only supported for Linux containers.

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

With CDI, device configurations are defined using a JSON file. In addition to
enabling the container to interact with the device node, it also lets you
specify additional configuration for the device, such as kernel modules, host
libraries, and environment variables.
With CDI, device configurations are declaratively defined using a JSON or YAML
file. In addition to enabling the container to interact with the device node,
it also lets you specify additional configuration for the device, such as
environment variables, host mounts (such as shared objects), and executable
hooks.

You can reference a CDI device with the `--device` flag using the
fully-qualified name of the device, as shown in the following example:
Expand All @@ -924,10 +926,10 @@ $ docker run --device=vendor.com/class=device-name --rm -it ubuntu
This starts an `ubuntu` container with access to the specified CDI device,
`vendor.com/class=device-name`, assuming that:

- A valid CDI specification (JSON file) for the requested device is available
on the system running the daemon, in one of the configured CDI specification
directories.
- The CDI feature has been enabled on the daemon side, see [Enable CDI
- A valid CDI specification (JSON or YAML file) for the requested device is
available on the system running the daemon, in one of the configured CDI
specification directories.
- The CDI feature has been enabled in the daemon; see [Enable CDI
devices](https://docs.docker.com/reference/cli/dockerd/#enable-cdi-devices).

### <a name="attach"></a> Attach to STDIN/STDOUT/STDERR (-a, --attach)
Expand Down