diff --git a/content/manuals/desktop/features/desktop-cli.md b/content/manuals/desktop/features/desktop-cli.md new file mode 100644 index 00000000000..1c6d428ac47 --- /dev/null +++ b/content/manuals/desktop/features/desktop-cli.md @@ -0,0 +1,42 @@ +--- +title: Using the Docker Desktop CLI +linkTitle: Docker Desktop CLI +weight: 120 +description: How to use the Docker Desktop CLI +keywords: cli, docker desktop, macos, windows, linux +params: + sidebar: + badge: + color: green + text: New +--- + +{{% experimental title="Beta" %}} +Docker Desktop CLI is currently in [Beta](../../release-lifecycle.md#beta). +{{% /experimental %}} + +The Docker Desktop CLI lets you perform key operations such as starting, stopping, restarting, and checking the status of Docker Desktop directly from the command line. It is available with Docker Desktop version 4.37 and later. + +The Docker Desktop CLI provides: + +- Enhanced automation and CI/CD integration: Perform Docker Desktop operations directly in CI/CD pipelines for better workflow automation. +- An improved developer experience: Restart, quit, or reset Docker Desktop from the command line, reducing dependency on the Docker Desktop Dashboard and improving flexibility and efficiency. + +## Usage + +```console +docker desktop COMMAND [OPTIONS] +``` + +## Commands + +| Command | Description | +|:---------------------|:-----------------------------------------| +| `start` | Starts Docker Desktop | +| `stop` | Stops Docker Desktop | +| `restart` | Restarts Docker Desktop | +| `status` | Displays whether Docker Desktop is running or stopped. | +| `engine ls` | Lists available engines (Windows only) | +| `engine use` | Switch between Linux and Windows containers (Windows only) | + +For more details on each command, see the [Docker Desktop CLI reference](/reference/cli/docker/desktop/_index.md). diff --git a/content/manuals/desktop/features/usbip.md b/content/manuals/desktop/features/usbip.md index fe6024c05b5..12483da06bf 100644 --- a/content/manuals/desktop/features/usbip.md +++ b/content/manuals/desktop/features/usbip.md @@ -1,7 +1,7 @@ --- title: Using USB/IP with Docker Desktop linkTitle: USB/IP support -weight: 80 +weight: 100 description: How to use USB/IP in Docker Desktop keywords: usb, usbip, docker desktop, macos, windows, linux toc_max: 3 diff --git a/content/manuals/desktop/features/vmm.md b/content/manuals/desktop/features/vmm.md index 1af1d399b51..e1099faeae6 100644 --- a/content/manuals/desktop/features/vmm.md +++ b/content/manuals/desktop/features/vmm.md @@ -8,7 +8,7 @@ params: text: New keywords: virtualization software, resource allocation, mac, docker desktop, vm monitoring, vm performance, apple silicon description: Discover Docker Desktop for Mac's Virtual Machine Manager (VMM) options, including the new Docker VMM for Apple Silicon, offering enhanced performance and efficiency -weight: 90 +weight: 110 aliases: - /desktop/vmm/ --- diff --git a/content/manuals/desktop/features/wsl/_index.md b/content/manuals/desktop/features/wsl/_index.md index 882ae9bc065..74a5eae3e9d 100644 --- a/content/manuals/desktop/features/wsl/_index.md +++ b/content/manuals/desktop/features/wsl/_index.md @@ -5,7 +5,7 @@ keywords: wsl, wsl2, installing wsl2, wsl installation, docker wsl2, wsl docker, tech preview, wsl install docker, install docker wsl, how to install docker in wsl title: Docker Desktop WSL 2 backend on Windows linkTitle: WSL -weight: 100 +weight: 90 aliases: - /docker-for-windows/wsl/ - /docker-for-windows/wsl-tech-preview/ diff --git a/content/reference/cli/docker/desktop/_index.md b/content/reference/cli/docker/desktop/_index.md new file mode 100644 index 00000000000..be7ff711b12 --- /dev/null +++ b/content/reference/cli/docker/desktop/_index.md @@ -0,0 +1,10 @@ +--- +datafolder: desktop-cli +datafile: docker_desktop +title: docker desktop (Beta) +layout: cli +--- + +{{% experimental title="Beta" %}} +Docker Desktop CLI is currently in [Beta](/manuals/release-lifecycle.md#beta). +{{% /experimental %}} \ No newline at end of file diff --git a/content/reference/cli/docker/desktop/engine/_index.md b/content/reference/cli/docker/desktop/engine/_index.md new file mode 100644 index 00000000000..97950535974 --- /dev/null +++ b/content/reference/cli/docker/desktop/engine/_index.md @@ -0,0 +1,6 @@ +--- +datafolder: desktop-cli +datafile: docker_desktop_engine +title: docker desktop engine +layout: cli +--- \ No newline at end of file diff --git a/content/reference/cli/docker/desktop/engine/ls.md b/content/reference/cli/docker/desktop/engine/ls.md new file mode 100644 index 00000000000..a8499b1385e --- /dev/null +++ b/content/reference/cli/docker/desktop/engine/ls.md @@ -0,0 +1,6 @@ +--- +datafolder: desktop-cli +datafile: docker_desktop_engine_ls +title: docker desktop engine ls +layout: cli +--- \ No newline at end of file diff --git a/content/reference/cli/docker/desktop/engine/use.md b/content/reference/cli/docker/desktop/engine/use.md new file mode 100644 index 00000000000..56f58a96655 --- /dev/null +++ b/content/reference/cli/docker/desktop/engine/use.md @@ -0,0 +1,6 @@ +--- +datafolder: desktop-cli +datafile: docker_desktop_engine_use +title: docker desktop engine use +layout: cli +--- \ No newline at end of file diff --git a/content/reference/cli/docker/desktop/restart.md b/content/reference/cli/docker/desktop/restart.md new file mode 100644 index 00000000000..75ef78eeb49 --- /dev/null +++ b/content/reference/cli/docker/desktop/restart.md @@ -0,0 +1,6 @@ +--- +datafolder: desktop-cli +datafile: docker_desktop_restart +title: docker desktop restart +layout: cli +--- \ No newline at end of file diff --git a/content/reference/cli/docker/desktop/start.md b/content/reference/cli/docker/desktop/start.md new file mode 100644 index 00000000000..cc9dd36d3e4 --- /dev/null +++ b/content/reference/cli/docker/desktop/start.md @@ -0,0 +1,10 @@ +--- +datafolder: desktop-cli +datafile: docker_desktop_start +title: docker desktop start +layout: cli +--- + +> [!NOTE] +> +> `docker desktop start` does not work when executed via SSH on Windows due to a limitation in how WinCred stores credentials securely. \ No newline at end of file diff --git a/content/reference/cli/docker/desktop/status.md b/content/reference/cli/docker/desktop/status.md new file mode 100644 index 00000000000..b0b868c579b --- /dev/null +++ b/content/reference/cli/docker/desktop/status.md @@ -0,0 +1,6 @@ +--- +datafolder: desktop-cli +datafile: docker_desktop_status +title: docker desktop status +layout: cli +--- \ No newline at end of file diff --git a/content/reference/cli/docker/desktop/stop.md b/content/reference/cli/docker/desktop/stop.md new file mode 100644 index 00000000000..203bdef5669 --- /dev/null +++ b/content/reference/cli/docker/desktop/stop.md @@ -0,0 +1,6 @@ +--- +datafolder: desktop-cli +datafile: docker_desktop_stop +title: docker desktop stop +layout: cli +--- \ No newline at end of file diff --git a/data/desktop-cli/docker_desktop.yaml b/data/desktop-cli/docker_desktop.yaml new file mode 100644 index 00000000000..a222a240064 --- /dev/null +++ b/data/desktop-cli/docker_desktop.yaml @@ -0,0 +1,24 @@ +command: docker desktop +short: Docker Desktop +long: Control Docker Desktop from the CLI +usage: docker desktop +pname: docker +plink: docker.yaml +cname: + - docker desktop start + - docker desktop stop + - docker desktop restart + - docker desktop status + - docker desktop engine +clink: + - docker_desktop_start.yaml + - docker_desktop_stop.yaml + - docker_desktop_restart.yaml + - docker_desktop_status.yaml + - docker_desktop_engine.yaml +deprecated: false +hidden: false +experimental: false +experimentalcli: false +kubernetes: false +swarm: false \ No newline at end of file diff --git a/data/desktop-cli/docker_desktop_engine.yaml b/data/desktop-cli/docker_desktop_engine.yaml new file mode 100644 index 00000000000..86295164a62 --- /dev/null +++ b/data/desktop-cli/docker_desktop_engine.yaml @@ -0,0 +1,17 @@ +command: docker desktop engine +short: Commands to list and switch containers (Windows only) +usage: docker desktop engine +pname: docker desktop +plink: docker_desktop.yaml +cname: + - docker desktop engine ls + - docker desktop engine use +clink: + - docker_desktop_engine_ls.yaml + - docker_desktop_engine_use.yaml +deprecated: false +hidden: false +experimental: false +experimentalcli: false +kubernetes: false +swarm: false \ No newline at end of file diff --git a/data/desktop-cli/docker_desktop_engine_ls.yaml b/data/desktop-cli/docker_desktop_engine_ls.yaml new file mode 100644 index 00000000000..52a1012d06d --- /dev/null +++ b/data/desktop-cli/docker_desktop_engine_ls.yaml @@ -0,0 +1,11 @@ +command: docker desktop engine ls +short: List available engines (Windows only) +usage: docker desktop engine ls +pname: docker desktop engine +plink: docker_desktop_engine.yaml +deprecated: false +hidden: false +experimental: false +experimentalcli: false +kubernetes: false +swarm: false \ No newline at end of file diff --git a/data/desktop-cli/docker_desktop_engine_use.yaml b/data/desktop-cli/docker_desktop_engine_use.yaml new file mode 100644 index 00000000000..e289519506c --- /dev/null +++ b/data/desktop-cli/docker_desktop_engine_use.yaml @@ -0,0 +1,11 @@ +command: docker desktop engine use +short: Switch to Windows or Linux containers (Windows only) +usage: docker desktop engine use NAME +pname: docker desktop engine +plink: docker_desktop_engine.yaml +deprecated: false +hidden: false +experimental: false +experimentalcli: false +kubernetes: false +swarm: false \ No newline at end of file diff --git a/data/desktop-cli/docker_desktop_restart.yaml b/data/desktop-cli/docker_desktop_restart.yaml new file mode 100644 index 00000000000..4809ede1544 --- /dev/null +++ b/data/desktop-cli/docker_desktop_restart.yaml @@ -0,0 +1,11 @@ +command: docker desktop restart +short: Restart Docker Desktop +usage: docker desktop restart +pname: docker desktop +plink: docker_desktop.yaml +deprecated: false +hidden: false +experimental: false +experimentalcli: false +kubernetes: false +swarm: false \ No newline at end of file diff --git a/data/desktop-cli/docker_desktop_start.yaml b/data/desktop-cli/docker_desktop_start.yaml new file mode 100644 index 00000000000..3422aa8873d --- /dev/null +++ b/data/desktop-cli/docker_desktop_start.yaml @@ -0,0 +1,32 @@ +command: docker desktop start +short: Start Docker Desktop +usage: docker desktop start [OPTIONS] +pname: docker desktop +plink: docker_desktop.yaml +options: + - option: detach + value_type: bool + default_value: false + description: Start Docker Desktop in the background + deprecated: false + hidden: false + experimental: false + experimentalcli: false + kubernetes: false + swarm: false + - option: timeout + value_type: init + default_value: 0 + description: Specify in seconds how long to wait for Docker Desktop to start before timing out + deprecated: false + hidden: false + experimental: false + experimentalcli: false + kubernetes: false + swarm: false +deprecated: false +hidden: false +experimental: false +experimentalcli: false +kubernetes: false +swarm: false diff --git a/data/desktop-cli/docker_desktop_status.yaml b/data/desktop-cli/docker_desktop_status.yaml new file mode 100644 index 00000000000..e69a46a6e17 --- /dev/null +++ b/data/desktop-cli/docker_desktop_status.yaml @@ -0,0 +1,11 @@ +command: docker desktop status +short: Display Docker Desktop's status +usage: docker desktop status +pname: docker desktop +plink: docker_desktop.yaml +deprecated: false +hidden: false +experimental: false +experimentalcli: false +kubernetes: false +swarm: false \ No newline at end of file diff --git a/data/desktop-cli/docker_desktop_stop.yaml b/data/desktop-cli/docker_desktop_stop.yaml new file mode 100644 index 00000000000..e0b775a4e6f --- /dev/null +++ b/data/desktop-cli/docker_desktop_stop.yaml @@ -0,0 +1,41 @@ +command: docker desktop stop +short: Stop Docker Desktop +usage: docker desktop stop [OPTIONS] +pname: docker desktop +plink: docker_desktop.yaml +options: + - option: detach + value_type: bool + default_value: false + description: Stop Docker Desktop in the background + deprecated: false + hidden: false + experimental: false + experimentalcli: false + kubernetes: false + swarm: false + - option: force + value_type: bool + default_value: false + deprecated: false + hidden: false + experimental: false + experimentalcli: false + kubernetes: false + swarm: false + - option: timeout + value_type: init + default_value: 0 + description: Specify in seconds how long to wait for Docker Desktop to stop before timing out + deprecated: false + hidden: false + experimental: false + experimentalcli: false + kubernetes: false + swarm: false +deprecated: false +hidden: false +experimental: false +experimentalcli: false +kubernetes: false +swarm: false \ No newline at end of file