VisionFive2 Debian运行Docker失败,求内核bridge/br_netfilter配置选项
在VisionFive2的Debian系统中编译内核以支持Docker所需的bridge和br_netfilter选项
我在VisionFive2上安装了Debian系统,运行Docker时出现如下错误:
user@starfive:~$ sudo dockerd WARN[2024-03-02T13:08:27.753708638Z] Unable to find memory controller WARN[2024-03-02T13:08:27.753772888Z] Unable to find io controller WARN[2024-03-02T13:08:27.753885889Z] Unable to find cpuset controller WARN[2024-03-02T13:08:27.753972639Z] Unable to find pids controller INFO[2024-03-02T13:08:27.755205397Z] Loading containers: start. WARN[2024-03-02T13:08:27.763888949Z] Running modprobe bridge br_netfilter failed with message: modprobe: WARNING: Module bridge not found in directory /lib/modules/5.15.0-starfive modprobe: WARNING: Module br_netfilter not found in directory /lib/modules/5.15.0-starfive , error: exit status 1 WARN[2024-03-02T13:08:27.921853397Z] Could not load necessary modules for IPSEC rules: protocol not supported INFO[2024-03-02T13:08:27.943487527Z] Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address INFO[2024-03-02T13:08:27.970871192Z] [core] Channel Connectivity change to SHUTDOWN module=grpc INFO[2024-03-02T13:08:27.971098693Z] [core] Subchannel Connectivity change to SHUTDOWN module=grpc INFO[2024-03-02T13:08:27.971636946Z] stopping event stream following graceful shutdown error="<nil>" module=libcontainerd namespace=moby INFO[2024-03-02T13:08:27.972497202Z] stopping event stream following graceful shutdown error="context canceled" module=libcontainerd namespace=plugins.moby INFO[2024-03-02T13:08:27.972850954Z] stopping healthcheck following graceful shutdown module=libcontainerd INFO[2024-03-02T13:08:27.973038955Z] [core] Channel Connectivity change to SHUTDOWN module=grpc INFO[2024-03-02T13:08:27.973209706Z] [core] Subchannel Connectivity change to SHUTDOWN module=grpc INFO[2024-03-02T13:08:27.973820710Z] [core] Subchannel Connectivity change to CONNECTING module=grpc INFO[2024-03-02T13:08:27.974033461Z] [core] Channel Connectivity change to CONNECTING module=grpc INFO[2024-03-02T13:08:27.974120461Z] [core] Subchannel picks a new address "unix:///var/run/docker/containerd/containerd.sock" to connect module=grpc failed to start daemon: Error initializing network controller: Error creating default "bridge" network: package not installed
打算重新编译Linux内核,请问执行make menuconfig时需要启用哪些选项来支持bridge和br_netfilter模块?
所需内核配置选项
启用bridge模块:
路径:Networking support -> Networking options -> 802.1d Ethernet Bridging
配置:设置为M(编译为模块)或Y(编译进内核),推荐选M方便灵活加载。对应内核配置项:CONFIG_BRIDGE启用br_netfilter模块:
路径:Networking support -> Networking options -> Network packet filtering framework (Netfilter) -> Core Netfilter Configuration -> Bridged IP/ARP packets filtering
配置:设置为M或Y,对应内核配置项:CONFIG_BRIDGE_NETFILTER
可选但推荐的Docker相关配置
为确保Docker网络功能完整,建议同时启用以下选项:
Networking support -> Networking options -> Network packet filtering framework (Netfilter) -> IP: Netfilter Configuration -> iptables support(CONFIG_IP_NF_IPTABLES)Networking support -> Networking options -> Network packet filtering framework (Netfilter) -> IP: Netfilter Configuration -> IPv4 connection tracking support(CONFIG_NF_CONNTRACK_IPV4)
内容的提问来源于stack exchange,提问作者Bender
相关产品推荐
相关产品推荐

