Doki v0.11.1 — Cross-Arch Emulation, Termux UX, Runner Refactor, Docs
Doki v0.11.1 — Cross-Arch Emulation, Termux UX, Runner Refactor, Docs
Breaking Changes
api.NewServernow returns(*Server, error)to propagate Podman shim init errors.podman.NewPodmanServer,NewPodManager,NewSecretManager,NewManifestManagernow return(*T, error)(fail-fast on store creation).macos.SelectBackendnow returns(Backend, error).
Cross-Architecture Emulation (pkg/emulation/config.go, 198 lines)
doki emu {show,detect,set,test}— 4 new CLI subcommands.- Three backends: QEMU user-mode (
qemu-x86_64-static,qemu-aarch64-static), FEX-Emu (FEXInterpreterfor x86-on-ARM), Box64 (lightweight x86_64 emulator). ~/.doki/emulation.json— persistent config with atomic writes (tmp+rename, 0600 permissions).DOKI_EMULATION_MODE/DOKI_EMULATOR— environment variable override (env wins over disk).emulation.PreferredMode(),NormalizeMode(),Detect(),SelectBest()— full public API for emulator lifecycle.- 4 unit tests:
TestNormalizeMode,TestSaveLoadPreferredMode,TestPreferredModeEnvWins,TestSelectBest. - Container images with foreign architectures (e.g.
linux/amd64on ARM64) are automatically routed through the selected emulator by the runner registry.
Runner Registry Refactor (pkg/runtime/registry.go)
BestFor()algorithm rewritten:requestedRuntime()→ workload-specific → emulation preference → priority ladder → native fallback.DOKI_RUNTIMEenvironment variable support (was previously ignored). Forces a specific runner.runnerUsableOnHost()— validates RootRequired, KVMRequired, and architecture compatibility before selecting a runner.preferredEmulationRunner()— routes foreign-arch images via QEMU/FEX/Box64 based onemulation.PreferredMode().- 5 new tests:
TestRegistryBestForUsesEnvRuntime,TestRegistryBestForChoosesHighestUsableLevel,TestRegistryBestForSkipsUnavailableHostRequirements,TestRegistryBestForCrossArchPrefersEmulation,TestRegistryBestForUsesQEMUPreference.
Daemon Host Addressing (cmd/dokid/main.go)
--hostflag with Docker-style format:unix:///path,tcp://addr:port, bare/path, oraddr:port.applyDaemonHost()— parses unix://, tcp://, and bare formats into socketPath/tcpAddr. SupportsDOKI_HOSTandDOCKER_HOSTenvironment variables.firstNonEmpty()helper for flag/env priority resolution.- 1 new test:
TestApplyDaemonHost(three parsing paths: unix://, tcp://, bare /path).
Termux Rootless Networking UX (Issue #5 follow-up)
pkg/deps/checker.go:termuxNetworkHint()— on Termux, shows "not available (requires root + /dev/net/tun)" instead of misleading "pkg install passt". Usescommon.IsTermux()guard.pkg/network/manager.go:setupRootlessNetworking()fallback INFO message now Termux-specific — explains the/dev/net/tun+CAP_NET_ADMINlimitation explicitly.pkgNameMap:pastaandslirp4netnsremoved from thepkg(Termux) package map entries — preventsdoki deps install pastafrom runningpkg install passtwhich would fail.- 1 new test:
TestSetupRootlessNetworking_Fallback— verifies the no-tools-available fallback path returns nil without panic.
Bug Fix — Issue #5 (46e7fb0)
pkg/runtime/runtime.go:logChownError()— chown EPERM in rootless mode now emits a single INFO message ("chown skipped in rootless mode") instead of hundreds of WARN lines. Non-EPERM errors remain WARN. ENOENT (broken symlinks in busybox) silently ignored.pkg/network/manager.go:setupRootlessNetworking()now triespasta→slirp4netns→ host netns fallback. Previously hard-crashed when pasta was not found.cmd/doki/main.go:dispatch()for subcommands now useshandleError()instead of rawfmt.Fprintf(os.Stderr, "Error: %v\n", err); os.Exit(1).ExitError{Code: 0}no longer prints "Error:".- Reproduced and verified on Termux/Android 12 aarch64 with
alpine:latest.
Documentation
- README.md: restored to v0.10.0 detail level (1243 lines) — Comparison table, Features, Quick Start, Binaries, Architecture, CLI commands, Dokifile Builder, Compose, REST API, Networking, DokiLink Mesh, DNS, Storage, Security, Configuration, Building, Project Structure, Compatibility, What is New, Contributing, Links.
- 22 wiki pages rewritten in clean systems-engineering style (zero emojis, zero SVG assets, zero ASCII box-drawing diagrams).
- 7 SVG files deleted from
.github/assets/(banner.svg,comparison.svg,divider.svg,footer.svg,performance.svg,platforms.svg,wave.svg). - Domain:
doki.opceanai.com→dok1.xyzacross README, wiki, and CI workflows. README.es.mdbadge updated to v0.11.1; domain updated.
Dependencies
pkg/deps/checker.go: new importgithub.com/OpceanAI/Doki/pkg/commonforcommon.IsTermux().pkg/runtime/registry.go: new importgithub.com/OpceanAI/Doki/pkg/emulationforemulation.PreferredMode().pkg/emulation/config.go: new package, depends ongithub.com/OpceanAI/Doki/pkg/common.- No new external dependencies added to
go.mod.
Quality Metrics
| Metric | v0.11.0 | v0.11.1 |
|---|---|---|
| Files | 165 | 177 |
| New packages | — | pkg/emulation |
| CLI commands | 108 | 112 (+4 doki emu) |
| Test files | ~32 | 41+ (+9 new tests) |
| README lines | 211 | 1243 |
| Wiki pages | 22 | 22 (rewritten) |
go vet |
0 | 0 |
staticcheck |
0 | 0 |
| Binaries | 42 | 42 (rebuilt) |
| Release assets | 61 | 72 |
Known Limitations
- Emulation backends are detected but not validated on real hardware (QEMU user-mode, FEX-Emu, Box64). Detection code works; runtime paths are wired but untested.
DOKI_EMULATION_MODErequires daemon restart for the runner registry to pick up the change.- On Termux, neither
pastanorslirp4netnsare functional (require/dev/net/tun+CAP_NET_ADMIN). The container shares the host network namespace via proot — functional but not isolated. README.es.mdremains at 329 lines (brutalist short form). The full English README is 1243 lines.
Security
emulation.json: stored with 0600 permissions and atomic write (tmp+rename) to prevent partial writes.logChownError(): prevents log injection from OCI file paths (uses structuredsloglogging).- All chown/lchown errors now pass through a centralized
logChownError()function with EPERM/ENOENT classification.
Install / Upgrade
# ARM64 (most Android devices, Apple Silicon, Linux ARM servers)
curl -L https://github.com/OpceanAI/Doki/releases/download/v0.11.1/doki-android-arm64 -o doki
curl -L https://github.com/OpceanAI/Doki/releases/download/v0.11.1/dokid-android-arm64 -o dokid
chmod +x doki dokid
# Verify
dokid --version
doki version
doki-kube version
doki-kubectl versionBuilding from Source
git clone https://github.com/OpceanAI/Doki.git
cd Doki
git checkout v0.11.1
make releaseFull changelog: v0.11.0...v0.11.1