Skip to content

Comments

feat: Podman container runtime support#120

Open
qard-spacebot wants to merge 4 commits intospacedriveapp:mainfrom
qard-spacebot:podman-support
Open

feat: Podman container runtime support#120
qard-spacebot wants to merge 4 commits intospacedriveapp:mainfrom
qard-spacebot:podman-support

Conversation

@qard-spacebot
Copy link

@qard-spacebot qard-spacebot commented Feb 22, 2026

Summary

  • Replace docker_socket_available() with resolve_container_socket_with() that probes DOCKER_HOST, Docker rootful /var/run/docker.sock, Podman rootful /run/podman/podman.sock, and Podman rootless $XDG_RUNTIME_DIR/podman/podman.sock in priority order
  • Store resolved socket path in UpdateStatus.socket_path (serde-skipped) and use it in apply_docker_update via bollard API v1.40 (Podman compat ceiling, backwards-compatible with Docker)
  • Extend mountinfo parsing to match /overlay-containers/<id>/ (Podman) alongside /docker/containers/<id>/ (Docker); extract parse_container_id_from_mountinfo for testability
  • Update update banner hint text from "Mount docker.sock" to "Mount the container runtime socket"
  • Add Podman section to docker.mdx: quick start, rootful and rootless socket mounting (rootless socket remapped to /run/podman/podman.sock inside the container — no XDG_RUNTIME_DIR needed), separate podman-compose examples, systemctl activation, SELinux note for Fedora/RHEL

Test plan

  • 12 unit tests in update.rs covering socket probe priority and mountinfo ID parsing for Docker and Podman
  • Built image from this branch (Podman, --network=host)
  • Ran with rootless Podman, mounting $XDG_RUNTIME_DIR/podman/podman.sock:/run/podman/podman.sock --security-opt label=disable
  • GET /api/update/checkcan_apply: true
  • POST /api/update/apply → bollard connected to Podman socket, inspected container via API v1.40, resolved target image, initiated pull — full chain verified
  • Container ID detection from /overlay-containers/<id>/ mountinfo pattern verified against live Podman container
  • Confirmed SELinux (Fedora/RHEL) blocks connectto on container_runtime_t without --security-opt label=disable; documented in Podman section
  • Rootless socket remapped to /run/podman/podman.sock inside container — verified can_apply: true without passing XDG_RUNTIME_DIR into the container

🤖 Generated with Claude Code

Stephen Belanger and others added 4 commits February 23, 2026 09:59
- Replace docker_socket_available() with resolve_container_socket_with()
  that probes DOCKER_HOST, Docker rootful, Podman rootful, and Podman
  rootless sockets in priority order
- Add socket_path field to UpdateStatus (serde-skipped) so the resolved
  path is carried through to apply_docker_update
- Connect via resolved socket using API v1.40 (Podman compat ceiling)
  instead of bollard's default; works with both Docker and Podman
- Extend mountinfo parsing to match /overlay-containers/<id>/ (Podman)
  in addition to /docker/containers/<id>/ (Docker)
- Extract parse_container_id_from_mountinfo for unit testability
- Add 12 unit tests covering socket probe priority and mountinfo parsing

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Change banner hint from "Mount docker.sock" to "Mount the container
  runtime socket" to be runtime-agnostic
- Add Podman section to docker.mdx covering quick start, rootful and
  rootless one-click update socket mounting, podman-compose example,
  systemctl socket activation, and SPACEBOT_DEPLOYMENT note

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
On Fedora/RHEL/SELinux systems, the container_t policy blocks connectto
on container_runtime_t sockets. Add --security-opt label=disable to all
Podman socket-mount examples and the podman-compose config.

Verified during local integration test: SELinux denials appear in audit
log without this option; the option resolves them.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Map the rootless host socket to /run/podman/podman.sock inside the
container rather than preserving the host's /run/user/<uid>/ path.
The container has no user profile, so the user-scoped path is a host
concept that doesn't belong in the container environment. Mapping to
the standard rootful path requires no XDG_RUNTIME_DIR inside the
container and avoids uid-specific paths in compose configs.

Also split the Podman Compose example into separate rootful and
rootless variants using ${XDG_RUNTIME_DIR} for the rootless case.

Verified: rootless socket mounted at /run/podman/podman.sock is
detected correctly and can_apply returns true.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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