zeus-s6-container-supervision

Modify and debug s6-overlay supervised services in the ZeusAgent Docker image.

Updated Sep 10, 2026
One-click install
npx skills add https://github.com/loteiron/ZeusAgent --skill zeus-s6-container-supervision-loteiron
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: zeus-s6-container-supervision
Source: https://github.com/loteiron/ZeusAgent/tree/main/optional-skills/devops/zeus-s6-container-supervision
Command: npx skills add https://github.com/loteiron/ZeusAgent --skill zeus-s6-container-supervision-loteiron

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Working on the ZeusAgent Docker image's s6-overlay supervision stack is error-prone: cont-init.d scripts receive no CMD args, s6 halt does not propagate exit codes, and per-profile gateway services live on tmpfs and vanish on restart. This Skill documents the architecture, key files, and pitfalls so you can add services or diagnose failures without rediscovering these constraints. ## Core Features & Use Cases - Architecture Reference: Explains the PID 1 layout, cont-init.d boot scripts, static s6-rc.d services, runtime-registered per-profile gateways under /run/service, and the main-wrapper.sh CMD pattern. - Operational Recipes: Provides copy-paste commands for verifying s6 is PID 1, inspecting services with s6-svstat, bringing services up/down with s6-svc, and watching the container-boot reconciler log. - Pitfall Diagnosis: Covers common failures such as 'command not found' via docker exec, root-owned profile directories, crash-looping gateways, and containers exiting 143. - Use Case: A per-profile gateway keeps restarting after docker restart. Use this Skill to check s6-svstat output, inspect container-boot.log, and determine whether the profile is missing model configuration or its service slot was wiped from tmpfs. ## Quick Start Ask the agent to diagnose why the gateway for profile 'coder' is not starting in the ZeusAgent Docker container.

Frequently Asked Questions about zeus-s6-container-supervision

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new static s6 service to a Docker image?▼

Create a directory under docker/s6-rc.d/<name> with a type file containing 'longrun' and a run script using '#!/command/with-contenv sh'. Add empty dependencies.d/base and user/contents.d/<name> files so it joins the user bundle, and the Dockerfile COPY picks it up automatically.

How do I check if an s6 service is running in a container?▼

Run docker exec with the absolute path /command/s6-svstat /run/service/<name>, since /command is not on the docker exec PATH. Output showing 'up (pid ...)' means running, while 'down (exitcode N) ... want up' indicates a crash loop.

Why does s6-svstat say command not found via docker exec?▼

The /command directory containing s6-overlay binaries is only on PATH for processes spawned by the supervision tree, such as services and cont-init.d scripts. Always use the absolute path /command/s6-svstat when running commands through docker exec.

Why does my s6 container always exit with code 143?▼

Invoking s6-svscanctl -t or /run/s6/basedir/bin/halt triggers stage 3 shutdown but returns 143 (SIGTERM) instead of your exit code. To get a real exit code, let the CMD exit normally rather than controlling exit from a finish script.

Why does a gateway service disappear after docker restart?▼

Per-profile gateway service directories live on tmpfs under /run/service and are wiped on container restart. The cont-init.d reconciler recreates them from persistent gateway_state.json files, so check docker logs for '02-reconcile' if a slot is missing.

Why does the profile gateway keep restarting with exitcode 1?▼

The most common cause is a profile with no model or auth configured; the s6 service slot itself is correct. Run zeus -p <profile> setup first, and the supervisor will keep the gateway up once configuration succeeds.