这是面向 Redmi K50 Ultra(diting)定制 Docker 内核的 KernelSU 用户态模块。
发布包自带固定版本的 Docker Engine、containerd、runc、Buildx、Compose、运行脚本
和中英双语 WebUI;安装后可直接在 root shell 中运行容器,无需手动部署二进制。
- Docker Engine 28.5.2、Buildx 0.35.0、Compose 5.3.1;
overlay2存储驱动和可创建、只扩容的 ext4 数据镜像;- 日用 cgroup v2 与 Docker 私有 cgroup v1 两种模式;
- 默认不改 Android 路由的
isolated网络,以及可选的 bridge/NAT; - 自动跟随当前 Android 或 VPN IPv4 DNS,也支持手动 DNS;
- KernelSU WebUI、开机自启、状态检查、日志和安全卸载。
本项目不是通用 Android Docker 安装器。目前只支持:
- Redmi K50 Ultra,代号
diting; - HyperOS
OS2.0.211.0.VLFCNXM; - android_kernel_xiaomi_diting_dev
的
mainDocker + KernelSU 内核; - KernelSU 模块系统和 root shell。
docker-only 内核不自带 KernelSU,不能单独安装本模块。其他 ROM、内核、设备或
Root 方案尚未验证,不应默认视为兼容。
- 先安装匹配 ROM 的
main内核,并保留原版boot.img作为恢复文件。 - 从本项目 Releases 下载
diting-docker-kernelsu-v*.zip和对应.sha256。 - 校验 SHA-256,在 KernelSU 管理器中安装 ZIP,然后重启。
- 打开模块 WebUI,或进入 root shell 检查:
docker info
docker buildx version
docker compose version
diting-docker status
diting-docker doctor默认使用 cgroup v2、isolated 网络和 8 GiB 数据镜像。isolated 模式不修改
Android 路由,需要联网的容器可先使用 --network host;只有确实需要容器独立
地址和端口映射时,才在 WebUI 中切换到 bridge。
| 模式 | 可用控制器 | 已知限制 |
|---|---|---|
| cgroup v2 | pids |
Android 将 memory、CPU、I/O 保留在 v1 层级 |
| private-v1 | memory、CPU、cpuset、devices、blkio | pids 已被 Android v2 层级占用 |
两种模式都无法在这套 Android cgroup 拓扑上同时提供全部控制器。日用默认选择 v2; 需要明确的内存、CPU 或块 I/O 配额时选择 private-v1。
bridge 模式会为 docker0 添加可逆的 Android 策略路由和 NAT,并在停止时恢复它
创建的规则。切换 Wi-Fi、移动数据或 VPN 后,需要重启 Docker 以重新识别上行。
自动 DNS 会读取当前 Android 网络的 IPv4 resolver。VPN 必须允许 UID 0/root 和 转发的容器流量;某些 fake-IP VPN 只代理普通应用,可能出现“能解析到 198.18/16, 但 TLS 连接被重置”的现象。手动 DNS 只改变解析服务器,不能修复上游网络污染、 VPN 排除规则或 Docker Hub 的可达性。
- 数据保存在
/data/unencrypted/docker,卸载模块不会删除它; - 镜像只允许扩容,不支持高风险的在线缩容;
- bridge 会临时改变转发 sysctl 和策略路由,正常停止时会恢复;
- Docker 提供接近主机 root 的能力,只运行可信镜像,不要向公网暴露未加固 daemon;
- 刷机、Root、内核和容器操作都可能造成数据丢失或无法启动,请保留恢复路径。
仓库不提交 Docker、Buildx 或 Compose 大型二进制。版本和 SHA-256 固定在
versions.env,构建时从官方发布地址下载并校验:
./validate-source.sh
./build-package.sh --download
sha256sum -c out/diting-docker-kernelsu-v*.zip.sha256build-package.sh 对上游静态二进制执行有数量约束、等长的 Android 路径替换,
生成模块内文件清单和 SHA-256 清单,并用固定时间戳生成可复现 ZIP。详见
THIRD_PARTY_NOTICES.md。
贡献需遵守 DCO 1.1,每个提交使用 git commit -s 签署。开发流程见
CONTRIBUTING.md。本项目自有源码采用 Apache-2.0;下载并打包的
第三方组件保留各自的上游许可证。
This KernelSU module provides the userspace companion for the Docker-enabled
Redmi K50 Ultra (diting) kernel. Release packages include pinned Docker
Engine, containerd, runc, Buildx, Compose, runtime scripts, and a bilingual
WebUI. No manual binary deployment is required.
- Docker Engine 28.5.2, Buildx 0.35.0, and Compose 5.3.1;
overlay2on a managed ext4 image that can be created or grown;- daily-use cgroup v2 and a Docker-private cgroup v1 profile;
- safe-by-default isolated networking and optional bridge/NAT networking;
- automatic Android/VPN IPv4 DNS selection with a manual override;
- KernelSU WebUI, automatic startup, diagnostics, logs, and safe uninstall.
This is not a generic Android Docker installer. The supported combination is:
- Redmi K50 Ultra (
diting); - HyperOS
OS2.0.211.0.VLFCNXM; - the
mainDocker + KernelSU variant from android_kernel_xiaomi_diting_dev; - KernelSU's module system and a root shell.
The docker-only kernel does not provide KernelSU and cannot use this module by
itself. Other ROMs, kernels, devices, and root solutions are untested.
- Install the matching
mainkernel and retain the stockboot.imgfor recovery. - Download
diting-docker-kernelsu-v*.zipand its checksum from Releases. - Verify SHA-256, install the ZIP in KernelSU Manager, and reboot.
- Open the module WebUI or verify it from a root shell:
docker info
docker buildx version
docker compose version
diting-docker status
diting-docker doctorThe default profile uses cgroup v2, isolated networking, and an 8 GiB data
image. Isolated mode leaves Android routing untouched; use --network host for
networked containers. Enable bridge mode only when separate container addresses
or port publishing are required.
On this Android cgroup topology, v2 exposes the pids controller while the
private-v1 profile exposes memory, CPU, cpuset, devices, and blkio. Neither mode
can expose every controller simultaneously.
Bridge mode installs owned, reversible policy rules for docker0. Restart
Docker after switching Wi-Fi, mobile data, or VPN. Automatic DNS follows the
active Android IPv4 resolver. A VPN must carry root and forwarded container
traffic; manual DNS cannot repair VPN exclusions, poisoned upstream DNS, or an
unreachable registry.
Docker data remains under /data/unencrypted/docker after module removal.
Images can be grown but not shrunk. Docker grants workloads host-equivalent
privilege, so run trusted images and retain a boot/data recovery path.
Large third-party binaries are not committed. Official downloads are pinned by
version and SHA-256 in versions.env:
./validate-source.sh
./build-package.sh --download
sha256sum -c out/diting-docker-kernelsu-v*.zip.sha256The packaging script applies count-checked, equal-length Android path substitutions, records provenance and file hashes, and produces a reproducible ZIP. See THIRD_PARTY_NOTICES.md.
Contributions follow DCO 1.1; sign every commit with git commit -s.
See CONTRIBUTING.md. Project-owned source is Apache-2.0 and
packaged third-party components retain their upstream licenses.