| 1 | # Docker Runtime Image DOX |
| 2 | |
| 3 | ## Purpose |
| 4 | |
| 5 | - Own the runnable Agent Zero image context and local compose example. |
| 6 | - Install Agent Zero from a selected branch onto the base image and prepare runtime entrypoints. |
| 7 | |
| 8 | ## Ownership |
| 9 | |
| 10 | - `Dockerfile` owns branch-based image assembly, exposed ports, and container startup command. |
| 11 | - `docker-compose.yml` owns the local compose service example. |
| 12 | - `build.txt` owns maintainer build and push command notes. |
| 13 | - `fs/exe/` owns runtime entrypoint, supervisor, self-update, Node eval, and service scripts. |
| 14 | - `fs/ins/` owns preinstall, installation, virtualenv, Playwright, SSH, and postinstall scripts. |
| 15 | - Files under `fs/` are copied to container root during the runtime build. |
| 16 | |
| 17 | ## Local Contracts |
| 18 | |
| 19 | - `BRANCH` is required for branch-based Docker builds. |
| 20 | - Preserve exposed ports for SSH, HTTP, and tunneled services unless docs and workflows are updated together. |
| 21 | - Keep the two-runtime Python model aligned with the root contract. |
| 22 | - Keep runtime desktop packages on `kali-last-snapshot`; carry the rolling base's matching ATK introspection package into that transaction, then pin the verified Python 3.13-compatible LibreOffice and complete Xpra runtime versions in `fs/ins/install_additional.sh` for both published architectures. |
| 23 | - Do not bake secrets, local `.env` values, or user data into the image. |
| 24 | - Runtime startup must ensure `/a0/usr/uploads` exists before supervised services start. |
| 25 | - Runtime startup raises the soft open-file limit toward `A0_NOFILE_LIMIT` (default `65535`) before supervisord starts, bounded by the container hard limit. |
| 26 | - Self-update user-data backups skip Time Travel shadow history under `usr/.time_travel/` and transient Desktop agent state. |
| 27 | - Self-update waits up to 180 seconds for the updated or restored WebUI health check by default; `A0_SELF_UPDATE_HEALTH_TIMEOUT_SECONDS` may override it. |
| 28 | - Successful or already-current self-updates refresh an installed Codex CLI with npm on a best-effort basis; missing CLIs and registry failures must not block Agent Zero startup. |
| 29 | |
| 30 | ## Work Guidance |
| 31 | |
| 32 | - Keep startup scripts explicit about framework runtime versus execution runtime. |
| 33 | - Coordinate tag, branch, and publishing changes with GitHub workflow automation. |
| 34 | |
| 35 | ## Verification |
| 36 | |
| 37 | - Build `docker/run` when changing Dockerfile or install scripts. |
| 38 | - Smoke-test container startup after entrypoint, supervisor, port, or compose changes. |
| 39 | |
| 40 | ## Child DOX Index |
| 41 | |
| 42 | No child DOX files. |