Home » Android » Using Docker on Android

Using Docker on Android

Posted by: admin June 15, 2020 Leave a comment


Would it be possible to build a Docker app on Android? I noticed there aren’t any right now, but the kernel is based on the Linux kernel, after all. If there’s a way to do this without rooting, all the better!

Some reasons I could see for not being able to do this are that while Android is based on the Linux kernel, it’s likely highly modified, and that Android is usually based on ARM, not x86 like most desktops & laptops currently running Docker. I don’t know if Docker needs to be on x86/amd64, but I can’t imagine it helps. Also, the Boot2Docker VM created on Windows & Macs, because they’re not Linux and so can’t natively handle Docker, is based on TinyCore Linux, yet it takes up 20GB, more than any but the latest, biggest Androids. I imagine there’s a reason for this huge size. Nevertheless, perhaps if necessary someone could port this distro to Android.

Is there anything else I’m missing? Is it inherently possible to create a Docker app for Android (or, for that matter, iOS or Windows Phone)? If not, why not? If so, does anyone know of any progress?

How to&Answers:

Android apps already run as containers on top of linux, similar to docker, using cgroups/namespaces. To run docker on android, it needs to support docker’s highlevel API. There is some discussion on the web, but most of it indicates the aufs file system as a blocker that needs an alternative.

Docker supports alternative file systems but using an alternative platform necessitates different images than the normal 64-bit user base, similar to when using Docker on 32-bit. Here is a good introduction to running Docker on ARM devices that covers a lot of what is involved. It was written before the alternative file systems were introduced but does talk about them near the end.