Required Kernel Options
The Docker open source team has provided a script that can detect whether the kernel configuration meets Docker's running requirements. The source address is: https://github.com/moby/moby/blob/master/contrib/check-config.sh.
- Get script and run the following
command:
$ ./check-config.sh
The following is the example output:The output results are mainly divided into 2 parts:- Generally Necessary: Indicates the necessary configuration.
The
missing
options in the figure need to be opened in the kernel configuration to recompile and burn the kernel to support Docker. - Optional Features: Indicates optional configuration, and can be opened as needed.
- Generally Necessary: Indicates the necessary configuration.
The
- From the example output, we can see that there are many missing options in the
necessary configuration. You can refer to this link to pull codes, switch
branches, and apply the default kernel options. After applying the default
options, configure the corresponding kernel options:
- To enable CONFIG_CGROUP_*, CONFIG_CPUSETS, CONFIG_MEMCG and itms under Controller, you need to enable following options under :
- To enable CONFIG_VETH, you need to enable Virtual ethernet pair device options under :
- To enable CONFIG_BRIDGE, you need to enable 802.1d Ethernet Bridging option under :
- To enable CONFIG_BRIDGE_NETFILTER, you need to enable Bridged IP/ARP packets filtering option under :
- To enable CONFIG_NETFILTER_XT_MATCH_ADDRTYPE, you need to enable “addrtype" address type match support option under :
- To enable CONFIG_IP_NF_MANGLE, you need to enable Packet mangling option under :
- To enable CONFIG_NETFILTER_XT_MATCH_IPVS, you need to enable the
following 2 options:
- Enable IP virtual server support option under :
- Enable "ipvs" match support option under :
- To enable CONFIG_IP6_NF_IPTABLES, you need to enable IP6 tables support (required for filtering) option under :
- To enable CONFIG_NF_TABLES_BRIDGE, you need to enable Ethernet Bridge nf_tables support (NEW) option under :
- After selecting the above options, you still need to enable the following options under , otherwise, Docker will not start properly: