Summary
Hive Mind's Docker isolation (--isolation docker) and the konard/hive-mind-dind image currently assume a DinD model (nested daemon seeded by box host-image passthrough). On disk-constrained hosts that model is unusable, because passthrough copies the multi-GB image into the nested daemon's separate store (we measured ~19.5 GB duplicated on a host with ~41 GB free). The same image can run in DooD mode (share the host daemon) with zero copy / zero extra disk, and it works today — but Hive Mind neither documents nor explicitly supports it. This issue asks Hive Mind to support and document both DooD and DinD isolation workflows at all levels (image, isolation-runner, deploy guidance, docs).
Background (confirmed)
src/isolation-runner.lib.mjs launches isolation via $ --isolated docker --image <ref> …, i.e. it runs docker run against whatever daemon the bot process's docker talks to. In a DinD container that's the nested daemon; if the bot mounts the host socket as its runtime (DooD), the very same code runs the task on the host daemon — which already has the image, so it's reused with no pull and no copy.
resolveDockerIsolationImageTag() makes a task request the exact HIVE_MIND_DOCKER_ISOLATION_IMAGE_TAG (e.g. konard/hive-mind-dind:2.0.13). For zero-copy reuse the host must hold that concrete tag, not just :latest.
- box-dind supports DooD out of the box (
DIND_SKIP_DAEMON=1 + host socket as /var/run/docker.sock); the entrypoint skips the nested daemon and the docker CLI then targets the host daemon. (Filed companion issue on box to document/support this and the --group-add <host-docker-gid> socket-access requirement, plus the lack of a zero-copy passthrough.)
What we verified works (DooD)
Running the bot container with -v /var/run/docker.sock:/var/run/docker.sock, -e DIND_SKIP_DAEMON=1, and --group-add <host-docker-gid>:
- the bot's
docker info reaches the host daemon;
docker image inspect konard/hive-mind-dind:2.0.13 is present on that daemon → a --isolation docker task reuses it with zero copy, zero pull, zero extra disk;
- each task still runs in its own container (process/fs/network isolation); only the daemon is shared.
This is the only no-copy option on hosts whose free disk can't hold a second copy of the image.
Requested changes
- Isolation runner / image — make isolation mode explicit and support both:
- DinD (current): nested daemon + passthrough. Keep, but it requires disk for the duplicated image.
- DooD (new, recommend as default on disk-constrained hosts): bot shares the host daemon; tasks reuse the host image. No deep code change is needed (the runner already does a plain
docker run), but please document/support it explicitly — e.g. honor an isolation-mode/DOCKER_HOST signal and a verbose note that "docker" here is the host daemon, and adapt the post-launch diagnostics (lines that currently say "nested daemon"/warn about passthrough re-pull) so they don't false-warn in DooD.
- Concrete-tag guidance — document that the host (or nested daemon) must hold the exact
HIVE_MIND_DOCKER_ISOLATION_IMAGE_TAG, never the floating latest, or the task re-pulls. (We pin the resolved version in our deploy.)
- Docs — a "Docker isolation: DinD vs DooD" page covering the tradeoff (per-task daemon isolation vs zero-copy/zero-disk), the run recipe for each, the
--group-add socket requirement, and the fact that one image supports both modes by run flags.
- Deploy guidance — update DOCKER.md / deploy docs to recommend DooD where disk is tight and to show how to verify the image is reused (host daemon reachable + concrete tag present) rather than silently re-pulled.
Reproduction / evidence
Confirmed end-to-end with a deploy-docker.mjs that deploys the bot in DooD mode against Docker 29.5 (containerd snapshotter). Verification step passes: "DooD docker access OK: bot reaches the host daemon" + "konard/hive-mind-dind:2.0.13 is already present on the host daemon (zero-copy, no pull on first task)". Happy to share the full script and logs. Related: #1914, #1946.
Summary
Hive Mind's Docker isolation (
--isolation docker) and thekonard/hive-mind-dindimage currently assume a DinD model (nested daemon seeded by box host-image passthrough). On disk-constrained hosts that model is unusable, because passthrough copies the multi-GB image into the nested daemon's separate store (we measured ~19.5 GB duplicated on a host with ~41 GB free). The same image can run in DooD mode (share the host daemon) with zero copy / zero extra disk, and it works today — but Hive Mind neither documents nor explicitly supports it. This issue asks Hive Mind to support and document both DooD and DinD isolation workflows at all levels (image, isolation-runner, deploy guidance, docs).Background (confirmed)
src/isolation-runner.lib.mjslaunches isolation via$ --isolated docker --image <ref> …, i.e. it runsdocker runagainst whatever daemon the bot process's docker talks to. In a DinD container that's the nested daemon; if the bot mounts the host socket as its runtime (DooD), the very same code runs the task on the host daemon — which already has the image, so it's reused with no pull and no copy.resolveDockerIsolationImageTag()makes a task request the exactHIVE_MIND_DOCKER_ISOLATION_IMAGE_TAG(e.g.konard/hive-mind-dind:2.0.13). For zero-copy reuse the host must hold that concrete tag, not just:latest.DIND_SKIP_DAEMON=1+ host socket as/var/run/docker.sock); the entrypoint skips the nested daemon and the docker CLI then targets the host daemon. (Filed companion issue on box to document/support this and the--group-add <host-docker-gid>socket-access requirement, plus the lack of a zero-copy passthrough.)What we verified works (DooD)
Running the bot container with
-v /var/run/docker.sock:/var/run/docker.sock,-e DIND_SKIP_DAEMON=1, and--group-add <host-docker-gid>:docker inforeaches the host daemon;docker image inspect konard/hive-mind-dind:2.0.13is present on that daemon → a--isolation dockertask reuses it with zero copy, zero pull, zero extra disk;This is the only no-copy option on hosts whose free disk can't hold a second copy of the image.
Requested changes
docker run), but please document/support it explicitly — e.g. honor an isolation-mode/DOCKER_HOST signal and a verbose note that "docker" here is the host daemon, and adapt the post-launch diagnostics (lines that currently say "nested daemon"/warn about passthrough re-pull) so they don't false-warn in DooD.HIVE_MIND_DOCKER_ISOLATION_IMAGE_TAG, never the floatinglatest, or the task re-pulls. (We pin the resolved version in our deploy.)--group-addsocket requirement, and the fact that one image supports both modes by run flags.Reproduction / evidence
Confirmed end-to-end with a
deploy-docker.mjsthat deploys the bot in DooD mode against Docker 29.5 (containerd snapshotter). Verification step passes: "DooD docker access OK: bot reaches the host daemon" + "konard/hive-mind-dind:2.0.13 is already present on the host daemon (zero-copy, no pull on first task)". Happy to share the full script and logs. Related: #1914, #1946.