Text of docs.docker.com › reference › api › extensions-sdk › DockerDesktopClient as Styx crawled it on Nov 19, 2026. The page may have changed since. Only its words are kept, without pictures or layout, and only the first part of a long page.

Open the live page

Interface: DockerDesktopClient | Docker Docs

Skip to content Search or ask Docker Search documentation Ask Docker Start a new chat Answers are generated based on the documentation. On this page: Extensions API An amalgam of the v0 and v1 interfaces of the Docker Desktop API client, provided for backwards compatibility reasons. Unless you're working with a legacy extension, use the v1 type instead. Properties backend • Readonly backend : undefined | BackendV0 The window.ddClient.backend object can be used to communicate with the backend defined in the vm section of the extension metadata.

The client is already connected to the backend. Warning It will be removed in a future version. Use extension instead. Inherited from DockerDesktopClientV0.backend extension • Readonly extension : Extension The ddClient.extension object can be used to communicate with the backend defined in the vm section of the extension metadata. The client is already connected to the backend. Inherited from DockerDesktopClientV1.extension desktopUI • Readonly desktopUI : DesktopUI Inherited from DockerDesktopClientV1.desktopUI host • Readonly host : Host Inherited from DockerDesktopClientV1.host docker • Readonly docker : Docker Inherited from DockerDesktopClientV1.docker Container Methods listContainers ▸ listContainers ( options ): Promise < unknown > Get the list of running containers (same as docker ps ).

By default, this will not list stopped containers. You can use the option {"all": true} to list all the running and stopped containers. const containers = await window . ddClient . listContainers (); Warning It will be removed in a future version. Use listContainers instead. Parameters Name Type Description options never (Optional). A JSON like { "all": true, "limit": 10, "size": true, "filters": JSON.stringify({ status: ["exited"] }), } For more information about the different properties see the Docker API endpoint documentation .

Returns Promise < unknown > Inherited from DockerDesktopClientV0.listContainers Image Methods listImages ▸ listImages ( options ): Promise < unknown > Get the list of images const images = await window . ddClient . listImages (); Warning It will be removed in a future version. Use listImages instead. Parameters Name Type Description options never (Optional). A JSON like { "all": true, "filters": JSON.stringify({ dangling: ["true"] }), "digests": true } For more information about the different properties see the Docker API endpoint documentation .

Returns Promise < unknown > Inherited from DockerDesktopClientV0.listImages Navigation Methods navigateToContainers ▸ navigateToContainers (): void Navigate to the container's window in Docker Desktop. window . ddClient . navigateToContainers (); Warning It will be removed in a future version. Use viewContainers instead. Returns void Inherited from DockerDesktopClientV0.navigateToContainers navigateToContainer ▸ navigateToContainer ( id ): Promise < any > Navigate to the container window in Docker Desktop. await window . ddClient . navigateToContainer ( id ); Warning It will be removed in a future version.

Parameters Name Type Description id string The full container id, e.g. 46b57e400d801762e9e115734bf902a2450d89669d85881058a46136520aca28 . You can use the --no-trunc flag as part of the docker ps command to display the full container id. Returns Promise < any > A promise that fails if the container doesn't exist. Inherited from DockerDesktopClientV0.navigateToContainer navigateToContainerLogs ▸ navigateToContainerLogs ( id ): Promise < any > Navigate to the container logs window in Docker Desktop. await window . ddClient . navigateToContainerLogs ( id ); Warning It will be removed in a future version.

Parameters Name Type Description id string The full container id, e.g. 46b57e400d801762e9e115734bf902a2450d89669d85881058a46136520aca28 . You can use the --no-trunc flag as part of the docker ps command to display the full container id. Returns Promise < any > A promise that fails if the container doesn't exist. Inherited from DockerDesktopClientV0.navigateToContainerLogs navigateToContainerInspect ▸ navigateToContainerInspect ( id ): Promise < any > Navigate to the container inspect window in Docker Desktop. await window . ddClient . navigateToContainerInspect ( id ); Warning It will be removed in a future version.

Parameters Name Type Description id string The full container id, e.g. 46b57e400d801762e9e115734bf902a2450d89669d85881058a46136520aca28 . You can use the --no-trunc flag as part of the docker ps command to display the full container id. Returns Promise < any > A promise that fails if the container doesn't exist. Inherited from DockerDesktopClientV0.navigateToContainerInspect navigateToContainerStats ▸ navigateToContainerStats ( id ): Promise < any > Navigate to the container stats to see the CPU, memory, disk read/write and network I/O usage. await window . ddClient . navigateToContainerStats ( id ); Warning It will be removed in a future version.

Parameters Name Type Description id string The full container id, e.g. 46b57e400d801762e9e115734bf902a2450d89669d85881058a46136520aca28 . You can use the --no-trunc flag as part of the docker ps command to display the full container id. Returns Promise < any > A promise that fails if the container doesn't exist. Inherited from DockerDesktopClientV0.navigateToContainerStats navigateToImages ▸ navigateToImages (): void Navigate to the images window in Docker Desktop. await window . ddClient . navigateToImages ( id ); Warning It will be removed in a future version.

Use viewImages instead. Returns void Inherited from DockerDesktopClientV0.navigateToImages navigateToImage ▸ navigateToImage ( id , tag ): Promise < any > Navigate to a specific image referenced by id and tag in Docker Desktop. In this navigation route you can find the image layers, commands, created time and size. await window . ddClient . navigateToImage ( id , tag ); Warning It will be removed in a future version.

Use viewImage instead. Parameters Name Type Description id string The full image id (including sha), e.g. sha256:34ab3ae068572f4e85c448b4035e6be5e19cc41f69606535cd4d768a63432673 . tag string The tag of the image, e.g. latest , 0.0.1 , etc. Returns Promise < any > A promise that fails if the container doesn't exist. Inherited from DockerDesktopClientV0.navigateToImage navigateToVolumes ▸ navigateToVolumes (): void Navigate to the volumes window in Docker Desktop. await window . ddClient . navigateToVolumes (); Warning It will be removed in a future version.

Use viewVolumes instead. Returns void Inherited from DockerDesktopClientV0.navigateToVolumes navigateToVolume ▸ navigateToVolume ( volume ): void Navigate to a specific volume in Docker Desktop. window . ddClient . navigateToVolume ( volume ); Warning It will be removed in a future version. Use viewVolume instead. Parameters Name Type Description volume string The name of the volume, e.g. my-volume . Returns void Inherited from DockerDesktopClientV0.navigateToVolume Other Methods execHostCmd ▸ execHostCmd ( cmd ): Promise < ExecResultV0 > Invoke a binary on the host.

The binary is typically shipped with your extension using the host section in the extension metadata. Note that extensions run with user access rights, this API is not restricted to binaries listed in the host section of the extension metadata (some extensions might install software during user interaction, and invoke newly installed binaries even if not listed in the extension metadata) window . ddClient . execHostCmd ( `cliShippedOnHost xxx` ). then (( cmdResult : any ) => { console . log ( cmdResult ); }); Warning It will be removed in a future version.

Use exec instead. Parameters Name Type Description cmd string The command to be executed. Returns Promise < ExecResultV0 > Inherited from DockerDesktopClientV0.execHostCmd spawnHostCmd ▸ spawnHostCmd ( cmd , args , callback ): void Invoke an extension binary on your host and get the output stream. window . ddClient . spawn

The rest of this page is on the live site.