我也遇到了同样的问题,查看了docker的日志是报如下错误:
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))
是iptables的问题,ubuntu22 默认情况下使用的是 iptables-nft , 而我用的WSL不支持,通过以下命令修改:
update-alternatives --config iptables
选择 “iptables-legacy”
重启 docker 问题就解决了,不知道你和我是不是一样的问题,先看一下docker日志里的具体报错原因,日志在/var/log/docker.log 里。