otto docker — stacks on lab hosts¶
otto docker builds images and orchestrates compose stacks on
docker-capable lab hosts, not on the machine otto runs on. Everything
rides the host subsystem: builds and compose commands execute over the
parent host’s existing SSH connection (hops included), which is the
parent-delegation design covered in
Design: Docker container hosts.
The compose lifecycle¶
Container hosts have a two-stage life:
Declared. At lab load, every service declared in a repo’s
[docker]settings is registered as a placeholderDockerContainerHost(id<parent>.<project>.<service>). Placeholders make--list-hostsand completion work before anything is running, and turn “no such host” into a precise “runotto docker upfirst.”Live.
compose upresolves real container ids and overwrites the placeholders;compose downcloses each container host before its parent’s connection (sessions must drain while the transport is alive — the ordering rule from The command lifecycle) and restores the placeholders.hosts.jsonis never written back — lab data stays read-only.
What is unique about docker¶
Content-addressed build skipping. Images are tagged with a hash of the Dockerfile, build context (after
.dockerignore), build args, and target stage;docker image inspecton the tag short-circuits a rebuild, and the hash is computed on the otto side so it stays correct across parents.--rebuildforces.No reservation gate of its own (
gate=False): a container has no independent reservation — the parent host’s reservation transitively covers its containers, so gating the parent is the whole story.