简体   繁体   English

如何从命令行停止在 WSL2 上集成运行的 docker 引擎?

[英]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.

相关问题 如何从 windows 到达并检查 docker 引擎是否在 wsl2 中运行 - How to reach and check if docker engine is running in wsl2 from windows 如何从 Docker 容器中访问在 WSL2 上运行的服务? - How can I access a service running on WSL2 from inside a Docker container? 如何访问 Docker 桌面使用的 wsl2? - How can I access wsl2 which is used by Docker desktop? 我可以在 WSL2 中使用 docker tmpfs 在 RAM 上运行 docker 容器吗? - Can I use docker tmpfs in WSL2 for running docker containers on RAM? 在带有 WSL2 的 Docker 桌面上运行的容器中没有实时 output - No live output from containers running on Docker Desktop with WSL2 在 WSL2 上运行 Docker 的僵尸文件夹起死回生 - Zombie folders coming back from the dead with Docker running on WSL2 在 WSL2 上的 docker 的 VS 代码中运行 powershell - running powershell inside VS Code from docker on WSL2 无法从 WSL2 docker 容器连接到 WSL2 localhost 服务器 - Can't connect to WSL2 localhost server from WSL2 docker container 在 WSL2 上使用 Docker 桌面和 Windows 10 主页时,如何更改 docker 图像的位置? - How can I change the location of docker images when using Docker Desktop on WSL2 with Windows 10 Home? 使用 WSL2 时如何为 docker for windows 运行 iptables 命令 - How to run an iptables command for docker for windows when using WSL2
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM