gpt4 book ai didi

docker - 无法使用新的 Windows 终端在 WSL2 中启动 Docker

转载 作者:行者123 更新时间:2023-12-02 17:58:56 25 4
gpt4 key购买 nike

我最近安装了WSL2并从Microsoft Store安装了Ubuntu。

Sudo服务Docker启动,我收到以下消息

Cannot connect to the Docker daemon. Is the docker daemon running on this host?

我按照此答案执行了以下步骤
    sudo groupadd docker
sudo usermod -aG docker $(whoami)

但是仍然无法启动docker ..检查Docker日志时,我可以看到以下内容

CONNECTING" module=grpc Error starting daemon: Error initializing network controller: error obtaining controller instance: failed to create NAT chain DOCKER: iptables failed: iptables -t nat -N DOCKER: iptables v1.6.1: can't initialize iptables table nat': Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded. (exit status 3) `

最佳答案

我根据以下错误尝试了很多步骤

can't initialize iptables table nat': Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded. (exit status 3) `



但是以管理员身份启动Terminal仍然有效。即使您运行
sudo service docker start

终端应以管理员身份启动

关于docker - 无法使用新的 Windows 终端在 WSL2 中启动 Docker,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57351688/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com