Docker engine on OpenWrt

I'm not aware of anyone working on it, but it shouldn't be too difficult. OpenWRT, being based on Linux + Musl + Busybox, has much in common with Alpine Linux. Alpine is very popular as a container base and can also also be used as a host:

http://web.ist.utl.pt/joao.leao.guerreiro/post/alpinedocker/

Clearly this means Docker Engine compiles OK against Musl libc, so it should be possible to build it on OpenWRT without problems.

I don't know whether OpenWRT has the necessary features enabled in the standard Kernel configuration, but it's easy to build OpenWRT from source, and the build system allows full access to Kernel options via "make menuconfig".

Some useful info about Docker Kernel config here:

https://wiki.gentoo.org/wiki/Docker#Kernel

One thing to be aware of is that Docker Engine itself is pretty hefty. The statically compiled binaries here should give you an idea of the size:

https://download.docker.com/linux/static/stable/x86_64/

Compiling against Musl may reduce the size, and perhaps there are compile options that reduce it further, but still it is rather impractically large for the limited hardware OpenWRT is targeted at. This, along with the large size of typical containers, results in very limited use cases for Docker on OpenWRT, which is probably why no-one has bothered yet. Still, if the hardware you're running OpenWRT on has sufficient capacity, it should work.

1 Like