You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tell us about your request
Most of the Docker Desktop settings are only available via the UI. Several users have commented that it would be useful to be able to control some of them via the CLI, in order to be able to script installation or running of Docker Desktop.
Which service(s) is this request for?
Docker Desktop
Are you currently working around the issue?
Editing the settings.json file works for settings, although not for operations such as Restart or Quit.
Reacted by Paul Jolly, Gledis Zeneli, Stefan Scherer, Feodor Fitsner, Jeff Rosenberg, Seth Allen, João Martins, Max Klein, John Hood, Rich Davis and 30 more
Right now, I don't see any command to reset the docker instance of kubernetes via the command line.
As a developer, part of my daily routine is to run a script that sets up my local cluster to a set starting point. I'm currently using Minikube on Mac, but I'd like to try DD for this, as minikube is a little extra complexity that I'm not sure is necessary for my team's needs.
In minikube, you pretty much just run minikube delete followed by minikube start to reset your cluster, whereas in DD it's a button in the UI; It would be really nice to make the button that resets the DD Kubernetes cluster a CLI command, preferably one that will wait until the reset is complete.
This is really important for CI applications. docker/for-mac#2359 has a number of fragile ways to do this that people have been trying to hold together since the old way went away a year or two ago.
Is there an update for this or the docker/for-mac/issues/2359 Issue?
I'm looking especially for an auto update mechanism. There is an official Guide to install via cli instead using brew here install-from-cli on MacOs
As far as I have been come I need to login to the headless machines and manually "accept & restart" Docker Desktop for Mac and I like this to happen automatically
Having a way to start Docker Desktop from CLI would be a great win for the community. I can verify there are a bunch of users looking for this in their CI setup.
At our company, we'd also like to automate developer environments with Docker Desktop and this is a hurdle for us - currently we are forced to show prompts to user, directing them to click around the UI - not the best experience 😕
I would find Open Docker Desktop Dashboard really valuable. It's annoying having to click the Go to Dashboard in the menu bar if I have previously closed the dashboard.
The listed items are great. It's also easy to look at how well done the Rancher Desktop rdctl and the OrbStack orb commands are done. Both of those solve all the issues discussed here. Thanks for working on this!
🙈 I should probably post the output from the CLI that I cobbled together some Years ago for an internal hackathon; looks like it still somewhat works;
docker desktop command with some initial subcommands;
docker desktop --help
Usage: docker desktop COMMAND
Commands to interact with Docker Desktop
Management Commands:
dashboard Control the Docker Desktop dashboard.
diagnostics Gather and upload diagnostics bundles for Docker Desktop.
Commands:
pause Pause Docker Desktop.
restart Restart Docker Desktop.
resume Resume Docker Desktop.
settings Open Docker Desktop settings.
shutdown Stop Docker Desktop.
start Start Docker Desktop.
Run 'docker desktop COMMAND --help'for more information on a command.
docker desktop diagnostics to help discovering reporting issues / sending diagnostics;
docker desktop diagnostics --help
Usage: docker desktop diagnostics COMMAND
Gather and upload diagnostics bundles for Docker Desktop.
Commands:
check-login Verify HTTP authenticating to login.docker.com and proxy configuration.
run Run diagnostic and suggest a way to repair the failures.
upload Create and optionally upload a diagnostics bundle.
Run 'docker desktop diagnostics COMMAND --help'for more information on a command.
If Desktop is shutdown (not suspended);
docker ps -a
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
docker desktop start
Starting Docker Desktop ...
docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
67451e904f48 docs/docstage "/docker-entrypoint.…" 23 hours ago Exited (0) 23 hours ago dockergithubio-docs-1
04aef664a1ff nginx:alpine "/docker-entrypoint.…" 5 days ago Exited (0) 2 hours ago 80/tcp foo
d3e93ee0e491 docker/swarmkit "make generate" 6 days ago Exited (0) 6 days ago laughing_mayer
d0e1fe510ef7 nginx:alpine "/docker-entrypoint.…" 13 days ago Exited (0) 2 hours ago container_one
042ab952468a busybox "sh" 13 days ago Exited (0) 2 hours ago pause_container
Some commands (TBD) to open the GUI from the command-line (e.g. open settings, open the dashboard), but settings could possibly also be managed from the command-line
I would find Open Docker Desktop Dashboard really valuable. It's annoying having to click the Go to Dashboard in the menu bar if I have previously closed the dashboard.
Could you kindly share which commands / settings, if made available through the CLI, would significantly enhance your operational efficiency?
We automate pulls and other normal docker commands, however our SSO tokens have very short TTLs, so they often expire. This results in docker commands returning something like docker login to proceed, unfortunately docker login only works if you're logging into docker hub without SSO. In our case the error is more confusing because the user does it, and it doesn't fix it. The user actually needs to open docker desktop, and then click login, and then go through the SSO process.
As a partial step towards this, it'd be great if we could trigger login and take the user straight to the login screen.
This action, and any other actions, could be triggered via docker desktop plugin, or via local RPC endpoint (which the plugin would use), or via docker-desktop URIs - however these would offer the least functionality. A documented API endpoint would be preferred :)
Is there honestly no way to restart Docker Desktop on Windows via CLI?
Mine has a weird bug where my containers just freeze after about 24-48 hours and I have to restart them, which I think is WSL related, but currently I have to do "wsl --shutdown" and then VNC in to click a "Restart" button on the modal that pops up, and it seems fairly ridiculous there doesn't appear to be an obvious way I can just restart the whole of Docker Desktop via a command or two without having to resort to that?
Please could you consider adding a feature like git config to allow us to get/set configuration for docker desktop. We currently alter the docker settings file using jq, but when we do so:
We do not know that the file format will not change.
Docker desktop complains that its settings file has been changed, which is alarming for users.
Even the location of the settings file is not certain.
A CLI contract would help here.
Additionally, CLI start/ stop/ restart and access to the troubleshoot commands would be very helpful.
Loving the new start/stop/etc feature. Are you going to consider a config API? Should I ask in a separate ticket - or perhaps I've missed a preexisting ticket? Many thanks.
Resetting the kubernetes cluster via the docker desktop CLI would be extremely useful for our team. That is the one step of our local development flow that we cannot automate with docker desktop currently. It requires a manual step to open the UI and click the "reset" button.
Reacted by Lari Hotari, Ryan White and Artur Moura
Activity
myitcv commentedon Nov 18, 2020
Related context docker/for-mac#2359 (comment)
richard-mauri commentedon Apr 27, 2021
+1
kevin-lindsay-1 commentedon May 22, 2021
Hey! Per docker/cli#3101 (comment), pasting this comment:
Right now, I don't see any command to reset the docker instance of kubernetes via the command line.
As a developer, part of my daily routine is to run a script that sets up my local cluster to a set starting point. I'm currently using Minikube on Mac, but I'd like to try DD for this, as minikube is a little extra complexity that I'm not sure is necessary for my team's needs.
In minikube, you pretty much just run minikube delete followed by minikube start to reset your cluster, whereas in DD it's a button in the UI; It would be really nice to make the button that resets the DD Kubernetes cluster a CLI command, preferably one that will wait until the reset is complete.
rfay commentedon May 6, 2022
This is really important for CI applications. docker/for-mac#2359 has a number of fragile ways to do this that people have been trying to hold together since the old way went away a year or two ago.
violen commentedon Oct 13, 2022
Is there an update for this or the docker/for-mac/issues/2359 Issue?
I'm looking especially for an auto update mechanism. There is an official Guide to install via cli instead using brew here install-from-cli on MacOs
As far as I have been come I need to login to the headless machines and manually "accept & restart" Docker Desktop for Mac and I like this to happen automatically
rfay commentedon Jul 15, 2023
There's still no supported way to start Docker Desktop (Windows or mac) from the command line right? Even though there's now unattended install?
sandipndev commentedon Jan 23, 2024
Having a way to start Docker Desktop from CLI would be a great win for the community. I can verify there are a bunch of users looking for this in their CI setup.
jpillor-macquarie commentedon Feb 8, 2024
At our company, we'd also like to automate developer environments with Docker Desktop and this is a hurdle for us - currently we are forced to show prompts to user, directing them to click around the UI - not the best experience 😕
KatTomrushka commentedon Feb 20, 2024
Could you kindly share which commands / settings, if made available through the CLI, would significantly enhance your operational efficiency?
The following seem to be on the shortlist so far:
We value your input and are interested in understanding your preferences.
colinhemmings commentedon Feb 20, 2024
I would find Open Docker Desktop Dashboard really valuable. It's annoying having to click the
Go to Dashboardin the menu bar if I have previously closed the dashboard.rfay commentedon Feb 20, 2024
The listed items are great. It's also easy to look at how well done the Rancher Desktop
rdctland the OrbStackorbcommands are done. Both of those solve all the issues discussed here. Thanks for working on this!thaJeztah commentedon Feb 20, 2024
🙈 I should probably post the output from the CLI that I cobbled together some Years ago for an internal hackathon; looks like it still somewhat works;
docker desktopcommand with some initial subcommands;docker desktop diagnosticsto help discovering reporting issues / sending diagnostics;If Desktop is shutdown (not suspended);
Some commands (TBD) to open the GUI from the command-line (e.g. open settings, open the dashboard), but settings could possibly also be managed from the command-line
Restart and shutdown;
Oh, and I had a version with some really (really!) hacky code to manage updates and install/uninstall (to go from a cli-only situation to desktop);
And some commands to manage updates;
(but looks like those are broken, which doesn't surprise me 😂);
docker desktop update check Checking if Docker Desktop updates are available ...jpillor-macquarie commentedon Feb 20, 2024
@colinhemmings @KatTomrushka you can do this today, link or
openURIdocker-desktop://dashboard/openjpillor-macquarie commentedon Feb 20, 2024
We automate pulls and other normal docker commands, however our SSO tokens have very short TTLs, so they often expire. This results in docker commands returning something like
docker login to proceed, unfortunatelydocker loginonly works if you're logging into docker hub without SSO. In our case the error is more confusing because the user does it, and it doesn't fix it. The user actually needs to open docker desktop, and then click login, and then go through the SSO process.As a partial step towards this, it'd be great if we could trigger login and take the user straight to the login screen.
This action, and any other actions, could be triggered via
docker desktopplugin, or via local RPC endpoint (which the plugin would use), or viadocker-desktopURIs - however these would offer the least functionality. A documented API endpoint would be preferred :)seliquity commentedon Nov 3, 2024
Is there honestly no way to restart Docker Desktop on Windows via CLI?
Mine has a weird bug where my containers just freeze after about 24-48 hours and I have to restart them, which I think is WSL related, but currently I have to do "wsl --shutdown" and then VNC in to click a "Restart" button on the modal that pops up, and it seems fairly ridiculous there doesn't appear to be an obvious way I can just restart the whole of Docker Desktop via a command or two without having to resort to that?
KatTomrushka commentedon Nov 4, 2024
Yes, @seliquity good point and restart is definitely included in the scope. Thanks for the feedback, keep it coming!
ch-tstrickland commentedon Nov 25, 2024
Please could you consider adding a feature like
git configto allow us to get/set configuration for docker desktop. We currently alter the docker settings file using jq, but when we do so:A CLI contract would help here.
Additionally, CLI start/ stop/ restart and access to the troubleshoot commands would be very helpful.
ch-tstrickland commentedon Dec 19, 2024
Loving the new start/stop/etc feature. Are you going to consider a config API? Should I ask in a separate ticket - or perhaps I've missed a preexisting ticket? Many thanks.
joeykmh commentedon Mar 20, 2025
Resetting the kubernetes cluster via the docker desktop CLI would be extremely useful for our team. That is the one step of our local development flow that we cannot automate with docker desktop currently. It requires a manual step to open the UI and click the "reset" button.