Skip to content

feat(docker): container commands find Podman engine and rootless sandboxes write workspace (#1117) - #1555

Merged
dan-petty merged 1 commit into
release/v0.2.34from
feat/1117-podman-engine-and-rootless-sandbox
Oct 11, 2026
Merged

dan-petty merged 1 commit into
release/v0.2.34from
feat/1117-podman-engine-and-rootless-sandbox

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

Closes #1117

Summary of Changes

  • Engine Endpoint Resolution Precedence:
    1. CONTAINER_CONNECTION: If set, raises a clear configuration error directing configuration to CONTAINER_HOST without dialling or constructing a client.
    2. CONTAINER_HOST: Environment variable override (honors Docker TLS settings DOCKER_TLS_VERIFY and DOCKER_CERT_PATH).
    3. DOCKER_HOST: Standard Docker daemon host override.
    4. DOCKER_CONTEXT: Explicit context name.
    5. Docker currentContext (non-default context).
    6. Rootless Podman Socket: $XDG_RUNTIME_DIR/podman/podman.sock (or /run/user/<uid>/podman/podman.sock when unset), if the socket exists.
    7. Rootful Podman Socket: /run/podman/podman.sock, if the socket exists and os.access allows read and write.
    8. Docker Default Socket: /var/run/docker.sock.
  • Default Socket Failure Guidance: When connecting to the default socket fails, the error message directs users: ; set CONTAINER_HOST or DOCKER_HOST, or run systemctl --user enable --now podman.socket.
  • Engine Facts Introspection: Added kind(), is_rootless(), and security_options() to DockerEngineService, memoized per instance.
  • Rootless Sandbox User Mapping: Workload sandbox containers on rootless engines set user="0:0", mapping container root to host UID for write access to mounted workspaces without permission errors. Host uid:gid is passed on rootful engines, and omitted when running with --root.
  • Container Stats Frames: container_stats discards the 1st frame and calculates CPU deltas from the 2nd frame before closing the stream; stream_container_stats skips the uncalculated 1st frame.
  • Build Cache Adaptation: devops docker cache on Podman informs user and exits 1 with guidance to use devops docker prune, calling neither prune_builds nor df.
  • Process & Security Boundaries:
    • _wait_for_docker_daemon polls get_engine().ping() without calling the docker binary.
    • Dive scanner sets DOCKER_HOST in subprocess env when the resolved endpoint was not originally from DOCKER_HOST.
    • Cosign image signing and verification pass extra_allowed_env={"XDG_RUNTIME_DIR"}.
    • Removed obsolete DEFAULT_CONTAINER_ENGINE and BIN_DOCKER constants.
  • Documentation & Verification:
    • Updated docs/cheatsheets/docker.md and src/devops_cli/ai/knowledge_base/devops_cli/libraries/docker.md.
    • Added changelog fragment changelog.d/1117.md and task tracking docs/agent/tasks/task-1117-podman-engine-and-rootless-sandbox.md.
    • Added comprehensive test suites across test_docker_engine.py, test_sandbox_lifecycle.py, test_security_dive.py, test_docker_cosign.py, and test_devcontainer.py.

…boxes write workspace (#1117)

- Resolve engine endpoints in precedence order: CONTAINER_HOST, DOCKER_HOST, DOCKER_CONTEXT, currentContext, rootless Podman, rootful Podman (with R/W check), Docker default
- Raise configuration error naming CONTAINER_HOST if CONTAINER_CONNECTION is set
- Guide user to set CONTAINER_HOST/DOCKER_HOST or run systemctl --user enable --now podman.socket on default dial failure
- Introspect engine facts (kind, is_rootless, security_options) with memoization
- Map sandbox container user to 0:0 on rootless engines so workloads can write mounted workspaces
- Drop uncalculated first stats frame and compute CPU deltas from second frame
- Inform user and exit 1 on devops docker cache for Podman without calling prune_builds or df
- Poll get_engine().ping() in _wait_for_docker_daemon without subprocess
- Propagate DOCKER_HOST to Dive and allow XDG_RUNTIME_DIR in Cosign
- Remove DEFAULT_CONTAINER_ENGINE and BIN_DOCKER constants
- Add documentation in cheatsheets and knowledge base, and changelog fragment
@dan-petty dan-petty added this to the v0.2.34 milestone Oct 11, 2026
@dan-petty
dan-petty merged commit fae4f4b into release/v0.2.34 Oct 11, 2026
11 checks passed
@dan-petty
dan-petty deleted the feat/1117-podman-engine-and-rootless-sandbox branch October 11, 2026 03:12
dan-petty added a commit that referenced this pull request Oct 11, 2026
* feat(ai): clean unread syntopical and cognitive research settings (#273) (#1551)

* chore(ai): remove the code, config and policies left over from the removed vLLM deployments (#820) (#1552)

* feat(ai): agentic information foraging & scent trails (#274) (#1553)

* fix(ai): reindex knowledge base on drift and inspect qdrant store (#1139) (#1554)

- Record installed knowledge base digest, embedding model, and timestamp on Qdrant points
- Rebuild knowledge base on first RAG use if points missing or digest differs, with 30m failure cooldown
- Update rag drift to inspect per-project Qdrant points and KB digest drift
- Update rag status to display points, embedding model, dimension, KB digest, and last index time
- Register and emit devops_cli_rag_points telemetry gauge
- Add test suite in tests/test_rag_kb_sync.py

* feat(docker): container commands find Podman engine and rootless sandboxes write workspace (#1117) (#1555)

- Resolve engine endpoints in precedence order: CONTAINER_HOST, DOCKER_HOST, DOCKER_CONTEXT, currentContext, rootless Podman, rootful Podman (with R/W check), Docker default
- Raise configuration error naming CONTAINER_HOST if CONTAINER_CONNECTION is set
- Guide user to set CONTAINER_HOST/DOCKER_HOST or run systemctl --user enable --now podman.socket on default dial failure
- Introspect engine facts (kind, is_rootless, security_options) with memoization
- Map sandbox container user to 0:0 on rootless engines so workloads can write mounted workspaces
- Drop uncalculated first stats frame and compute CPU deltas from second frame
- Inform user and exit 1 on devops docker cache for Podman without calling prune_builds or df
- Poll get_engine().ping() in _wait_for_docker_daemon without subprocess
- Propagate DOCKER_HOST to Dive and allow XDG_RUNTIME_DIR in Cosign
- Remove DEFAULT_CONTAINER_ENGINE and BIN_DOCKER constants
- Add documentation in cheatsheets and knowledge base, and changelog fragment

* fix(k8s): remove monitoring Service aliases and direct consumers to Helm chart Services (#1104) (#1556)

* fix(ai): a rag collection records its embedding model, a mismatch fails instead of wiping the collection, and ranking keeps the cosine score (#1066) (#1557)

* fix(ai): a rag collection records its embedding model, a mismatch fails instead of wiping the collection, and ranking keeps the cosine score (#1066)

* fix(ai): isolate search verified model cache per instance and test run

* feat(cli): worktree inventory & safe orphan reclamation (devops repos worktrees) (#700) (#1558)

* fix(k8s): tunnel sync and url setup preserve existing routes, catch-all, and remote URLs (#794) (#1559)

* fix(ai): a partial pricing snapshot replaces the whole catalog and never expires (#793) (#1560)

* feat(github): defect prs carry their hardening readiness blocker and post-merge audit (#697) (#1561)

* refactor(review): delete the legacy segment engine and the whole-file reviewer (#995) (#1564)

* chore(service): hold the roadmap service at 0 replicas while its machine account is suspended (#1562) (#1563)

GitHub suspended the Service's machine account. The deployment asks for
0 replicas so an Argo CD sync or deploy-stack cannot start it again, and
AGENTS.md and k8s/README.md tell people and agents not to scale, restart
or re-push secrets for it, and to leave its blocked items alone.

Closes #1562


Claude-Session: https://claude.ai/code/session_01S4n2mumzbvufbjZbXcX5JV

Co-authored-by: Claude <[email protected]>

* docs(agents): AGENTS.md fits a context budget and Claude Code loads it (#841) (#1565)

* feat(release): v0.2.34

---------

Co-authored-by: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant