-
Notifications
You must be signed in to change notification settings - Fork 261
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
Control Docker Desktop via CLI #172
Comments
Related context docker/for-mac#2359 (comment) |
+1 |
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. |
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? 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 |
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? |
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 😕 |
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. |
I would find Open Docker Desktop Dashboard really valuable. It's annoying having to click the |
The listed items are great. It's also easy to look at how well done the Rancher Desktop |
🙈 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 --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 --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
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); 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.
update Manage Docker Desktop software updates.
Commands:
install Install Docker Desktop.
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.
uninstall Uninstall Docker Desktop.
Run 'docker desktop COMMAND --help' for more information on a command. docker desktop install
Installing Docker Desktop...
Successfully installed Docker Desktop 4.28 (build 138140)
Starting Docker Desktop ... docker desktop uninstall
Shutting down Docker Desktop ...
Docker Desktop was shut down successfully
Uninstalling Docker Desktop...
Successfully uninstalled Docker Desktop And some commands to manage updates; docker desktop update --help
Usage: docker desktop update COMMAND
Manage Docker Desktop software updates.
Commands:
check Check for Docker Desktop updates.
download Download Docker Desktop updates.
install Install Docker Desktop updates.
Run 'docker desktop update COMMAND --help' for more information on a command. (but looks like those are broken, which doesn't surprise me 😂); docker desktop update check
Checking if Docker Desktop updates are available ... |
@colinhemmings @KatTomrushka you can do this today, link or |
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 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 |
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? |
Yes, @seliquity good point and restart is definitely included in the scope. Thanks for the feedback, keep it coming! |
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.
The text was updated successfully, but these errors were encountered: