WSL2 上无需 sudo 的 docker

WSL2 上无需 sudo 的 docker

根据https://docs.docker.com/engine/security/rootless/运行dockerd-rootless-setuptool.sh install将允许您在没有 sudo 的情况下运行 Docker,但是,当我尝试执行此操作时,出现此错误:

[ERROR] Missing system requirements. Run the following commands to
[ERROR] install the requirements and run this tool again.
[ERROR] Alternatively iptables checks can be disabled with --skip-iptables .

########## BEGIN ##########
sudo sh -eux <<EOF
# Load ip_tables module
modprobe ip_tables
EOF
########## END ##########

当我运行该命令时出现此错误:

modprobe: FATAL: Module ip_tables not found in directory /lib/modules/5.10.60.1-microsoft-standard-WSL2

根据https://unix.stackexchange.com/q/594470/54354使 ip_tables 可用的唯一真正方法是...从头编译内核?有没有不那么极端的解决方案,使 Docker 可以在没有 root 的情况下运行?

相关内容