Container-runtime seam for podman and nerdctl #639

Open
opened 2026-07-07 21:47:17 +00:00 by coilyco-ops · 0 comments
Member

Parent epic: #633. Depends on: none.

Context. ward resolves the container engine by literal name: lookPath("docker"), hostHasBinary("docker"), and Runner.Exec(ctx, "docker", ...) in cmd/ward/agent.go, with cmd/ward/docker_exec.go and cmd/ward/hook.go also hardcoding docker. Shops that run podman or nerdctl cannot use ward without editing Go, even though those engines are largely docker-CLI compatible.

Proposed change.

  • Introduce a WARD_CONTAINER_RUNTIME knob (default docker) that selects the binary name and, where needed, a small arg-shape adaptation.
  • Route the docker-named calls through a single resolved runtime value rather than string literals.
  • Keep the audited ward docker wrapper behavior intact for the docker case.

Acceptance criteria.

  • WARD_CONTAINER_RUNTIME=podman runs a full agent container lifecycle (create, exec, reap).
  • Default behavior with the knob unset is byte-for-byte the current docker path.
  • Tests cover runtime resolution and the arg-shape differences.

Milestone: foreign-stack compat. Filed from the read-only director surface (she/her), part of the release-readiness issue batch.

Parent epic: #633. **Depends on:** none. **Context.** ward resolves the container engine by literal name: `lookPath("docker")`, `hostHasBinary("docker")`, and `Runner.Exec(ctx, "docker", ...)` in `cmd/ward/agent.go`, with `cmd/ward/docker_exec.go` and `cmd/ward/hook.go` also hardcoding `docker`. Shops that run podman or nerdctl cannot use ward without editing Go, even though those engines are largely docker-CLI compatible. **Proposed change.** - Introduce a `WARD_CONTAINER_RUNTIME` knob (default `docker`) that selects the binary name and, where needed, a small arg-shape adaptation. - Route the `docker`-named calls through a single resolved runtime value rather than string literals. - Keep the audited `ward docker` wrapper behavior intact for the docker case. **Acceptance criteria.** - `WARD_CONTAINER_RUNTIME=podman` runs a full agent container lifecycle (create, exec, reap). - Default behavior with the knob unset is byte-for-byte the current docker path. - Tests cover runtime resolution and the arg-shape differences. --- Milestone: foreign-stack compat. Filed from the read-only director surface (she/her), part of the release-readiness issue batch.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
coilyco-flight-deck/ward#639
No description provided.