A Docker compatible Android kernel for Sony Xperia 5 II (pdx206).
可透過Termux於Android手機原生執行Docker容器的Sony Xperia 5 II核心。
This kernel adds supports for running Docker containers on Android. binfmt module is also included. It is based on LineageOS kernel for sm8250
Tested on LineageOS 20. A prebuilt boot.img is available at Releases.
- Flash the boot.img to
boot
partition
fastboot flash boot boot.img
- Install Docker in Termux
pkg install root-repo
pkg install docker docker-compose
- Mount cgroups
sudo mount -t tmpfs -o uid=0,gid=0,mode=0755 cgroup /sys/fs/cgroup
- Start docker daemon
sudo dockerd --iptables=false
- Test running
sudo docker run hello-world
- You can also enable binfmt to run x86 docker images on ARM.
su
mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc
echo 1 > /proc/sys/fs/binfmt_misc/status
Please refer to LineageOS Wiki to learn how to build LineageOS ROM for your device.
The configuration for running docker is already written in pdx206_defconfig
.
To build kernel only, run:
source build/envsetup.sh
breakfast pdx206
export ARCH=arm64
make clean
mka bootimage
Freddie Oliveira's Tutorial of running Docker on Android
[Root] Running Docker containers and Flatpak apps on Android phone with Termux