Use the Docker Desktop CLI

もくじ

必要条件: Docker Desktop 4.37 およびそれ以降

The Docker Desktop CLI lets you perform key operations such as starting, stopping, restarting, and updating Docker Desktop directly from the command line.

The Docker Desktop CLI provides:

  • Simplified automation for local development: Execute Docker Desktop operations more efficiently in scripts and tests.
  • 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

docker desktop COMMAND [OPTIONS]

Commands

CommandDescription
startStarts Docker Desktop
stopStops Docker Desktop
restartRestarts Docker Desktop
statusDisplays whether Docker Desktop is running or stopped.
engine lsLists available engines (Windows only)
engine useSwitch between Linux and Windows containers (Windows only)
updateManage Docker Desktop updates. Available for Mac only with Docker Desktop version 4.38, or all OSs with Docker Desktop version 4.39 and later.
logsPrint log entries
disableDisable a feature
enableEnable a feature
versionShow the Docker Desktop CLI plugin version information
kubernetesList Kubernetes images used by Docker Desktop or restart the cluster. Available with Docker Desktop version 4.44 and later.

For more details on each command, see the Docker Desktop CLI reference.