[英]How can I stop the docker engine running integrated on WSL2 from the command line?
I run WSL2 on Windows with an Ubuntu distribution inside WSL, and Docker desktop using the integrated "WSL2-based engine".我在 Windows 上运行 WSL2,在 WSL 中使用 Ubuntu 分布,并使用集成的“基于 WSL2 的引擎”在 Docker 桌面上运行。
If I do wsl --shutdown
in the CLI, Docker Desktop complains about the backend shutting down unexpectedly.如果我在 CLI 中执行wsl --shutdown
,Docker Desktop 会抱怨后端意外关闭。
What command should I issue before the wsl --shutdown
to shutdown the Docker engine without danger of loosing data?我应该在wsl --shutdown
之前发出什么命令来关闭 Docker 引擎而不会有丢失数据的危险?
What command should I issue before the
wsl --shutdown
to shutdown the Docker engine without danger of loosing data?我应该在wsl --shutdown
之前发出什么命令来关闭 Docker 引擎而不会有丢失数据的危险?
I'm not sure about a "command" (which would be nice, since I prefer keyboard interaction over the mouse for most things), but at the moment I'm just using the GUI.我不确定“命令”(这很好,因为在大多数情况下我更喜欢键盘交互而不是鼠标),但目前我只是使用 GUI。 To make sure that Docker Desktop is safely shut down, I go to the Windows Taskbar icon (usually in "Hidden Icons"/overflow, unless you've configured it otherwise), right-click, and Quit Docker Desktop . To make sure that Docker Desktop is safely shut down, I go to the Windows Taskbar icon (usually in "Hidden Icons"/overflow, unless you've configured it otherwise), right-click, and Quit Docker Desktop .
There may be a way to script it.可能有一种编写脚本的方法。 I did try taskkill
(without) the /f
(force) option, but that didn't work.我确实尝试了taskkill
(没有) /f
(强制)选项,但这没有用。
It sounds like rmlogotest.exe
, which is a tool for sending Windows shutdown messages to applications might work.听起来像rmlogotest.exe
,它是一个向应用程序发送 Windows 关闭消息的工具,它可能会起作用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.