WSL2 Ubuntu 21.04原生Docker无法运行的问题
最近为了用上更新一点的软件,把运行在WSL2里的Ubuntu 20.04 LTS版本升级了一下,升级到了Ubuntu 21.04,升级之后呢,大部分功能都正常(当然本身我用的功能也不会很多),但是确实也遇到了个小问题:Docker Daemon无法启动了。这个确实很影响工作,因为很多时候写完代码会本地打个镜像运行一下,简单测试一下代码是否有问题。但是升级之后,突然发现Docker用不了了。
具体点呢,是会报一个iptables
相关的错误:
......
WARN[2021-10-23T11:30:05.864210900+08:00] Your kernel does not support cgroup blkio throttle.write_iops_device
INFO[2021-10-23T11:30:05.864538700+08:00] Loading containers: start.
INFO[2021-10-23T11:30:06.135353300+08:00] stopping event stream following graceful shutdown error="context canceled" module=libcontainerd namespace=moby
INFO[2021-10-23T11:30:06.135542600+08:00] stopping healthcheck following graceful shutdown module=libcontainerd
INFO[2021-10-23T11:30:06.136083800+08:00] 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: unable to add return rule in DOCKER-ISOLATION-STAGE-1 chain: (iptables failed: iptables --wait -A DOCKER-ISOLATION-STAGE-1 -j RETURN: iptables v1.8.7 (nf_tables): RULE_APPEND failed (No such file or directory): rule in chain DOCKER-ISOLATION-STAGE-1
(exit status 4))