Port freeze/migrate off host Docker (last docker-bootstrap in the firecracker path) #397

Closed
opened 2026-07-17 00:16:48 -04:00 by didericis-claude · 0 comments
Collaborator

Context

The last host-Docker dependency in the Firecracker launch path (PRD 0069 / #348). Stage 2 (#395) removed Docker from the infra-image bootstrap by pulling a prebuilt rootfs artifact; Stage 3 already builds agent images in-VM with buildah. What remains is freeze/migrate.

Where Docker still runs on the launch host

  1. Freeze / commitfirecracker/freezer.py:73 runs docker build to snapshot a running agent VM into an image.
  2. Resuming a frozen/migrated agent — the committed-image branch of _build_agent_base (firecracker/launch.py:222) calls util.build_base_rootfs_dir(committed), which is docker create + docker export | tar (firecracker/util.py:188-206), plus docker_image_id (util.py:153).

Goal

Port both off host Docker so the Firecracker backend needs firecracker + KVM only — no Docker daemon, no docker group — completing #348. Likely shape: commit the agent VM's rootfs directly (it's already an ext4 we control) rather than round-tripping through a Docker image, and export/prepare it without docker export.

Note: docker_mod.build_image / build_base_rootfs_dir also back the opt-in BOT_BOTTLE_INFRA_BUILD=local dev escape hatch and the off-host publish_infra step — those are intentional and out of scope; this issue is only the freeze/migrate launch-path use.

## Context The **last** host-Docker dependency in the Firecracker launch path (PRD 0069 / #348). Stage 2 (#395) removed Docker from the infra-image bootstrap by pulling a prebuilt rootfs artifact; Stage 3 already builds agent images in-VM with buildah. What remains is **freeze/migrate**. ## Where Docker still runs on the launch host 1. **Freeze / commit** — `firecracker/freezer.py:73` runs `docker build` to snapshot a running agent VM into an image. 2. **Resuming a frozen/migrated agent** — the committed-image branch of `_build_agent_base` (`firecracker/launch.py:222`) calls `util.build_base_rootfs_dir(committed)`, which is `docker create` + `docker export | tar` (`firecracker/util.py:188-206`), plus `docker_image_id` (`util.py:153`). ## Goal Port both off host Docker so the Firecracker backend needs **firecracker + KVM only** — no Docker daemon, no `docker` group — completing #348. Likely shape: commit the agent VM's rootfs directly (it's already an ext4 we control) rather than round-tripping through a Docker image, and export/prepare it without `docker export`. Note: `docker_mod.build_image` / `build_base_rootfs_dir` also back the opt-in `BOT_BOTTLE_INFRA_BUILD=local` dev escape hatch and the off-host `publish_infra` step — those are intentional and out of scope; this issue is only the freeze/migrate launch-path use.
didericis added the Kind/Enhancement
Priority
High
2
labels 2026-07-17 00:18:43 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: didericis/bot-bottle#397