├── Kconfig └── README.md /Kconfig: -------------------------------------------------------------------------------- 1 | menu "Utilities" 2 | 3 | config DOCKER 4 | bool "Docker support" 5 | default n 6 | help 7 | Enable options required for Docker. 8 | 9 | select PROC_PID_CPUSET 10 | select NET 11 | select NETDEVICES 12 | select NET_CORE 13 | select INET 14 | select IPV6 15 | select NET_L3_MASTER_DEV 16 | select NETFILTER 17 | select NETFILTER_ADVANCED 18 | select NF_CONNTRACK 19 | select NETFILTER_XTABLES 20 | select NF_CONNMARK_IPV4 21 | select IP_NF_IPTABLES 22 | select NF_NAT_MASQUERADE_IPV4 23 | select IP_NF_NAT 24 | select IP_NF_TARGET_NETMAP # TODO: required? 25 | select IP_NF_TARGET_REDIRECT # TODO: required? 26 | select NET_SCHED 27 | select CGROUP_NET_PRIO 28 | select CGROUP_NET_CLASSID 29 | select MD 30 | select TTY 31 | select UNIX98_PTYS 32 | select HUGETLBFS # TODO: overlay? 33 | select PERSISTENT_KEYRINGS # TODO: required? 34 | select ENCRYPTED_KEYS # TODO: required? 35 | select KEY_DH_OPERATIONS # TODO: required? 36 | 37 | # From ebuild 38 | select NAMESPACES 39 | select NET_NS 40 | select PID_NS 41 | select IPC_NS 42 | select UTS_NS 43 | select CGROUPS 44 | select CGROUP_CPUACCT 45 | select CGROUP_DEVICE 46 | select CGROUP_FREEZER 47 | select CGROUP_SCHED 48 | select CPUSETS 49 | select MEMCG 50 | select KEYS 51 | select VETH 52 | select BRIDGE 53 | select BRIDGE_NETFILTER 54 | select NF_NAT_IPV4 55 | select IP_NF_FILTER 56 | select IP_NF_TARGET_MASQUERADE 57 | select NETFILTER_XT_MATCH_ADDRTYPE 58 | select NETFILTER_XT_MATCH_CONNTRACK 59 | select NF_NAT 60 | select NF_NAT_NEEDED 61 | select POSIX_MQUEUE 62 | select USER_NS 63 | select SECCOMP 64 | select CGROUP_PIDS 65 | select BLK_DEV_THROTTLING 66 | select CFQ_GROUP_IOSCHED 67 | select CGROUP_HUGETLB 68 | select NET_CLS_CGROUP 69 | select FAIR_GROUP_SCHED 70 | select RT_GROUP_SCHED 71 | select IP_VS 72 | select IP_VS_PROTO_TCP 73 | select IP_VS_PROTO_UDP 74 | select IP_VS_NFCT 75 | select VXLAN 76 | select IPVLAN 77 | select MACVLAN 78 | select DUMMY 79 | select DEVPTS_MULTIPLE_INSTANCES 80 | select MEMCG_KMEM 81 | 82 | config DOCKER_STATISTICS 83 | bool "Gathering statistics" 84 | default y if DOCKER 85 | depends on DOCKER 86 | help 87 | Allow gathering statistics from running containers 88 | 89 | select RESOURCE_COUNTERS 90 | select BLK_CGROUP 91 | select IOSCHED_CFQ 92 | select CGROUP_PERF 93 | select CFS_BANDWIDTH 94 | 95 | ## Required kernel version: 4.5 96 | 97 | 98 | config DOCKER_SWAP 99 | bool "Enable swap limit" 100 | default n 101 | depends on DOCKER 102 | help 103 | Yes if you want to be able to limit swap usage of containers 104 | 105 | select MEMCG_SWAP 106 | select MEMCG_SWAP_ENABLED 107 | 108 | config DOCKER_SECURE_NETWORKS 109 | bool "Secure networks" 110 | default y if DOCKER 111 | depends on DOCKER 112 | help 113 | Yes if you use secure networks 114 | 115 | select XFRM_ALGO 116 | select XFRM_USER 117 | 118 | 119 | config DOCKER_AUFS 120 | bool "Use aufs" 121 | default y if DOCKER 122 | depends on DOCKER 123 | help 124 | Yes if you are using aufs 125 | 126 | select AUFS_FS 127 | select EXT4_FS_POSIX_ACL 128 | select EXT4_FS_SECURITY 129 | 130 | config DOCKER_BTRFS 131 | bool "Use btrfs" 132 | default n 133 | depends on DOCKER 134 | help 135 | Yes if you are using btrfs 136 | 137 | select BTRFS_FS 138 | select BTRFS_FS_POSIX_ACL 139 | 140 | config DOCKER_DEVICE_MAPPER 141 | bool "Device Mapper support" 142 | default y if DOCKER 143 | depends on DOCKER 144 | help 145 | Yes if you want support for device mapper (recommended) 146 | 147 | select BLK_DEV_DM 148 | select DM_THIN_PROVISIONING 149 | select EXT4_FS 150 | select EXT4_FS_POSIX_ACL 151 | select EXT4_FS_SECURITY 152 | 153 | config DOCKER_OVERLAY_FS 154 | bool "Use overlay FS" 155 | default y 156 | depends on DOCKER 157 | help 158 | Yes if want to use the Overlay FS (recommended) 159 | 160 | select OVERLAY_FS 161 | select EXT4_FS_SECURITY 162 | select EXT4_FS_POSIX_ACL 163 | 164 | endmenu 165 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Enable kernel options for Docker 2 | 3 | Add a simple option for enabling all the requirements for Docker to run. 4 | 5 | ## Install 6 | 7 | 1. Create a folder inside your kernel source tree, for example `utils`, then 8 | place the Kconfig in there. 9 | 2. Add a line into the root Kconfig: `source "utils/Kconfig"`. 10 | 11 | Sample final Kconfig: 12 | 13 | # 14 | # For a description of the syntax of this configuration file, 15 | # see Documentation/kbuild/kconfig-language.txt. 16 | # 17 | mainmenu "Linux/$ARCH $KERNELVERSION Kernel Configuration" 18 | 19 | config SRCARCH 20 | string 21 | option env="SRCARCH" 22 | 23 | source "utils/Kconfig" 24 | 25 | source "arch/$SRCARCH/Kconfig" 26 | 27 | 28 | Now enable the Docker support option: 29 | 30 | Utilities ---> 31 | [*] Docker support 32 | 33 | And you should be good to go. Compile the kernel, install, reboot, enjoy. 34 | 35 | ## Credits 36 | 37 | List created using information from the [Gentoo Docker Project](https://wiki.gentoo.org/wiki/Docker). 38 | --------------------------------------------------------------------------------