docker 启动 traefik 错误?
详细的报错信息如下:
May 16 06:06:57 lzc-pod-juyIZt dockerd[1391]: time="2025-05-16T06:06:57.617540160Z" level=error msg="failed to start container" container=675c06f1d672ee0c36441d4e0fcd69d48e38355a40a4e85b7a42d0019467ffc4 error="failed to set up container networking: driver failed programming external connectivity on endpoint monitoring-grafana (02c852b6417b0a591b3b22838f3fd71452fd32bf386bf1c186cb0ba5f256b398): Unable to enable DIRECT ACCESS FILTERING - DROP rule: (iptables failed: iptables --wait -t raw -A PREROUTING -p tcp -d 172.20.0.6 --dport 3000 ! -i br-8321df9162d9 -j DROP: iptables v1.8.7 (legacy): can't initialize iptables table `raw': Table does not exist (do you need to insmod?)\nPerhaps iptables or your kernel needs to be upgraded.\n (exit status 3))"在 /etc/systemd/system/docker.service.d/ 添加一个 override.conf 文件,里面是的内容是
override.conf
[Service]
Environment="DOCKER_INSECURE_NO_IPTABLES_RAW=1"添加后,执行下面的命令重启相关的服务
sudo systemctl daemon-reload
sudo systemctl restart docker
sudo systemctl restart lzc-ai-agentdocker 重启后,可以使用 docker info 查看
> docker info | grep DOCKER_INSECURE_NO_IPTABLES_RAW
WARNING: DOCKER_INSECURE_NO_IPTABLES_RAW is set