Installation/Running Docker on Android Devices

Hello, I am an experienced native Android developer with no knowledge or experience of Docker what so ever.

i would like to know if its possible to “run” docker on an Android phone without have to “root” the device and allow a C# (.NET) application to run in a docker container locally on the target device.

I have googled and found different answers from, “Its impossible” to “its possible by rooting the device” and including “Its possible without rooting the device”

any ideas and guidance would be very welcome

1 Like

Running Docker on Android is definitely not supported officially and you cannot run any official version on Android without modifying Docker or Android. So probably that’s why some people say “It is impossible”.

Other people may say it is possible, but I am pretty sure they were brave enough to change the android kernel or they found a special, Docker-like executable.

It was long ago when I tried any advanced modification on any of my android devices, but if I remember well, you can’t really change anything without rooting the phone.

Docker depends heavily on the Kernel capabilities, namespaces, control groups. As an Android developer you probably know much more about Android kernel and how the applications work and how they are isolated on Android, so if you are willing to build a custom Android kernel, you might be able to run some version/variant of Docker on Android, but I as an Android user would not try that.

I would rather try to find an Android emulator that can run in Docker containers and run everything on my PC/laptop. I guess you know about those too. I found this:

yes it is possible but as they told you it is not so simple, if you want to use Docker without rooting you must use qemu and termux, but believe me this too slow alternative is more of an easter egg and it is not usable.
Now to use it decently you must not only root, but also compile a specific kernel for your cell phone model and then install it through termux.
A third option is with Android 13, supposedly pixel6 allows you to create virtual machines with a performance similar to native, and some have been able to install linux or even windows, but did not investigate further about it

2 Likes