Container Support Enabled by Default for X86 builds
Username: Najdanovic Ivan
Origin: https://bugs.openwrt.org/index.php?do=details&task_id=2429
Hi, Will it be possible to make Release build for 19.07 for X86 and X86_64 have Kernel compiled with full support for LXC/Docker. The idea is to have kernel only for x86 based build compiled with support so that all of use who want to use containers on the router don’t have to recompile the kernel and be able to use kmod packages from the official repo.
Here are the kernel modules which should be included.
CONFIG_KERNEL_AIO=y
CONFIG_KERNEL_BLK_CGROUP=y
CONFIG_KERNEL_BLK_DEV_BSG=y
CONFIG_KERNEL_BLK_DEV_THROTTLING=y
CONFIG_KERNEL_BLK_DEV_THROTTLING_LOW=y
CONFIG_KERNEL_CFQ_GROUP_IOSCHED=y
CONFIG_KERNEL_CGROUPS=y
CONFIG_KERNEL_CGROUP_CPUACCT=y
CONFIG_KERNEL_CGROUP_DEVICE=y
CONFIG_KERNEL_CGROUP_FREEZER=y
CONFIG_KERNEL_CGROUP_PERF=y
CONFIG_KERNEL_CGROUP_PIDS=y
CONFIG_KERNEL_CGROUP_SCHED=y
CONFIG_KERNEL_CPUSETS=y
CONFIG_KERNEL_DEVPTS_MULTIPLE_INSTANCES=y
CONFIG_KERNEL_DEVTMPFS=y
CONFIG_KERNEL_DEVTMPFS_MOUNT=y
CONFIG_KERNEL_DIRECT_IO=y
CONFIG_KERNEL_FANOTIFY=y
CONFIG_KERNEL_FHANDLE=y
CONFIG_KERNEL_FREEZER=y
CONFIG_KERNEL_IPC_NS=y
CONFIG_KERNEL_LXC_MISC=y
CONFIG_KERNEL_MEMCG=y
CONFIG_KERNEL_MEMCG_KMEM=y
CONFIG_KERNEL_MEMCG_SWAP=y
CONFIG_KERNEL_MEMCG_SWAP_ENABLED=y
CONFIG_KERNEL_MM_OWNER=y
CONFIG_KERNEL_NAMESPACES=y
CONFIG_KERNEL_NETPRIO_CGROUP=y
CONFIG_KERNEL_NET_CLS_CGROUP=y
CONFIG_KERNEL_NET_NS=y
CONFIG_KERNEL_PERF_EVENTS=y
CONFIG_KERNEL_PID_NS=y
CONFIG_KERNEL_POSIX_MQUEUE=y
CONFIG_KERNEL_PROC_PID_CPUSET=y
CONFIG_KERNEL_RESOURCE_COUNTERS=y
CONFIG_KERNEL_USER_NS=y
CONFIG_KERNEL_UTS_NS=y
I’ve already tested building docked from this feed
https://gitlab.com/mcbridematt/openwrt-container-feed
with custom build OpenWrt images. But if any additional kmod package is need you’ll have to compile it as well. Additionally there is a great guide (in Russian)
https://habr.com/ru/post/341370/
on how to use LXC on OpenWrt
I completely understand the reason for not having these kernel modules on consumer router devices due to storage space limitation but most of users that use X86 for the router have a lot more disk space available.
Personaly I’m using APU3 Board with 64GB SSD to run OpenWrt and I want to use containers to run HomeAssistant on it and also as a
PHP
developer I can use Docker to run my Development server directly on the router so that I can easily switch between working on desktop and laptop.