首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >在WSL2 Ubuntu 18 LTS上运行docker时出现问题

在WSL2 Ubuntu 18 LTS上运行docker时出现问题
EN

Stack Overflow用户
提问于 2020-07-21 17:39:16
回答 1查看 617关注 0票数 1

我在我的windows10机器上安装了ubunto 18 LTS wsl2。

我已经安装了docker -请看下面的截图

现在,在启动Docker服务后,我尝试检查docker信息,但遇到了下面的错误。

我做了一些研究,偶然发现了这篇文章-- Cannot connect to the Docker daemon at unix:/var/run/docker.sock. Is the docker daemon running?

正如本文中所建议的,systemctl start docker也尝试了,但是以System has not been booted with systemd as init system (PID 1). Can't operate.的身份得到了错误

另一个建议是尝试sudo dockerd -这导致了下面的日志

代码语言:javascript
运行
复制
INFO[2020-07-21T14:45:02.918374600+05:30] [graphdriver] using prior storage driver: overlay2
WARN[2020-07-21T14:45:03.044702300+05:30] Your kernel does not support cgroup memory limit
WARN[2020-07-21T14:45:03.046625300+05:30] Unable to find cpu cgroup in mounts
WARN[2020-07-21T14:45:03.049054700+05:30] Unable to find blkio cgroup in mounts
WARN[2020-07-21T14:45:03.051115500+05:30] Unable to find cpuset cgroup in mounts
WARN[2020-07-21T14:45:03.053056000+05:30] mountpoint for pids not found
INFO[2020-07-21T14:45:03.056254900+05:30] Loading containers: start.
WARN[2020-07-21T14:45:03.108913100+05:30] Running iptables --wait -t nat -L -n failed with message: `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.`, error: exit status 3
INFO[2020-07-21T14:45:03.522988800+05:30] stopping event stream following graceful shutdown  error="<nil>" module=libcontainerd namespace=moby
INFO[2020-07-21T14:45:03.523923200+05:30] stopping healthcheck following graceful shutdown  module=libcontainerd
INFO[2020-07-21T14:45:03.524034200+05:30] stopping event stream following graceful shutdown  error="context canceled" module=libcontainerd namespace=plugins.moby
failed to start 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) 

接着,我在上面的iptable问题上搜索了一下,按照论坛上的指示找到了https://stackoverflow.com/questions/21983554,我尝试了sudo modprobe ip_tables,它提供了modprobe: FATAL: Module ip_tables not found in directory /lib/modules/4.4.0-18362-Microsoft

在所有这些之后,如果我在正确的轨道上,我需要一些指导。

EN

Stack Overflow用户

发布于 2020-08-06 14:21:17

1.终止dockerd进程(如果没有找到进程,转到2) ps -aux | grep dockerd

kill -9 DOCKERD_PROCESS_ID

2. 2.sudo dockerd &

运行dockerd成功!

票数 -2
EN
查看全部 1 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63011639

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档