简体   繁体   English

关闭 WSL 后如何重启 Docker Desktop?

[英]How to restart Docker Desktop after shutting down WSL?

I installed Docker Desktop for Win10 Home.我为 Win10 Home 安装了 Docker 桌面。 Everything went fine and I was able to start up minikube.一切顺利,我能够启动 minikube。 Later I decided to stop Vmmem.exe because I wanted to play a game.后来我决定停止Vmmem.exe ,因为我想玩游戏。 Ran the following command:运行以下命令:

wsl --shutdown

Now Vmmem.exe has stopped running but how do I restart it?现在Vmmem.exe已停止运行,但我该如何重新启动它?

minikube start gives the following error minikube start出现以下错误

* minikube v1.22.0 on Microsoft Windows 10 Home Single Language 10.0.19041 Build 19041
* Using the docker driver based on existing profile

X Exiting due to PROVIDER_DOCKER_VERSION_EXIT_1: "docker version --format -" exit status 1: error during connect: In the default daemon configuration on Windows, the docker client must be run with elevated privileges to connect.: Get "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/version": open //./pipe/docker_engine: The system cannot find the file specified.
* Documentation: https://minikube.sigs.k8s.io/docs/drivers/docker/

wsl -l -v gives following wsl -l -v给出以下

  NAME                   STATE           VERSION
* Ubuntu-20.04           Stopped         2
  docker-desktop-data    Stopped         2
  docker-desktop         Stopped         2

What am I missing here?我在这里想念什么? Any help is much appreciated任何帮助深表感谢

  1. Open Docker Desktop打开 Docker 桌面
  2. Click 'Troubleshooting' icon in top bar (between settings and sign in)单击顶部栏中的“疑难解答”图标(在设置和登录之间)
  3. Click 'Restart' (first option)单击“重新启动”(第一个选项)

Now docker is restarted and you'll have it enabled in your wsl现在 docker 已重新启动,您将在您的 wsl 中启用它

Steps to run install and run docker daemon on WSL2在 WSL2 上运行安装和运行 docker daemon 的步骤

Installation steps:安装步骤:


1. Add the stable channel repository and upadte run below commad:

   sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
   sudo apt-get update -y

2.Install the latest Docker CE
  sudo apt-get install -y docker-ce

3.Add user to docker group to run docker using non root user.
  sudo usermod -aG docker $USER && newgrp docker

4. Run docker daemon:
   sudo dockerd

Optional steps:

5. Configure Docker to start on boot
    sudo systemctl enable docker.service
    sudo systemctl enable containerd.service
   

    TO disable this use below command:
    
    
    sudo systemctl disable docker.service
    sudo systemctl disable containerd.service 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM