Skip to content

Conversation

@jmgilman
Copy link
Collaborator

@jmgilman jmgilman commented Jan 1, 2026

Summary

  • Add Podman as an alternative container runtime alongside Apple Containerization
  • Implement configurable runtime settings with runtime.name, privileged, and flags options
  • Default to Podman when runtime is not explicitly configured
  • Existing Apple runtime continues to work when runtime.name: apple

Changes

Configuration (internal/config/config.go)

  • Added RuntimeConfig struct with name, privileged, and flags fields
  • Added validation for runtime.name (must be podman or apple)
  • Default runtime is podman with privileged: false

Podman Runtime (internal/container/podman.go)

  • Implements full Runtime interface: Run, Exec, Stop, Start, Remove, Get, List, Build
  • Uses --systemd=always for systemd support
  • Applies --privileged when configured
  • Passes custom flags to every podman run invocation

Runtime Selection (internal/cmd/root.go)

  • Updated dependency check to be runtime-aware
  • Runtime selected based on runtime.name config

Tests (internal/container/podman_test.go)

  • Comprehensive unit tests for all Podman runtime methods

Example Configuration

runtime:
  name: podman        # "podman" or "apple" (default: podman)
  privileged: false   # Run containers in privileged mode
  flags:              # Custom flags passed to podman run
    - "--memory=2g"

Test plan

  • All existing tests pass
  • New Podman runtime tests pass
  • just check passes (format, lint, test)

Closes JMG-22

🤖 Generated with Claude Code

Add Podman as an alternative container runtime alongside Apple Containerization,
with configurable runtime settings.

Changes:
- Add RuntimeConfig struct to config with name, privileged, and flags fields
- Implement Podman runtime with full Runtime interface support
- Use --systemd=always for systemd support in Podman containers
- Apply --privileged and custom flags from config to podman run
- Update runtime initialization to select runtime based on config
- Default to Podman when runtime.name is not specified
- Add comprehensive unit tests for Podman runtime

Example configuration:
```yaml
runtime:
  name: podman        # "podman" or "apple"
  privileged: false
  flags:
    - "--memory=2g"
```

Closes JMG-22

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@linear
Copy link

linear bot commented Jan 1, 2026

jmgilman and others added 3 commits January 1, 2026 11:23
Address review feedback:
- Remove --format json from podman inspect (Podman outputs JSON by default)
- Use time.RFC3339Nano for parsing CreatedAt with RFC3339 fallback

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The session creation in manager.go was hardcoded to use `container exec`
(Apple CLI) regardless of the configured runtime. When using Podman,
this caused sessions to fail immediately because Podman containers
aren't visible to the Apple container CLI.

Added ExecCommand() method to the Runtime interface that returns the
appropriate exec command prefix for each runtime:
- Apple: ["container", "exec"]
- Podman: ["podman", "exec"]

The Manager now uses m.runtime.ExecCommand() when building the command
for multiplexer sessions, ensuring the correct CLI is used.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add feature parity with Podman runtime by supporting the same
configuration options for Apple Containerization. Both runtimes
now accept privileged mode and custom flags from the runtime config.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@jmgilman jmgilman merged commit 20bc326 into master Jan 1, 2026
1 check passed
@jmgilman jmgilman deleted the joshuagilman/jmg-22-add-podman-runtime-support-with-configurable-runtime branch January 1, 2026 20:10
jmgilman added a commit that referenced this pull request Jan 3, 2026
Current behavior:
Only Apple Containerization runtime was supported with hardcoded configuration and no runtime selection options

New behavior:
Supports both Podman and Apple Containerization runtimes with configurable privileged mode and custom flags. Runtime selection based on config with Podman as default. Dependency checking updated to verify runtime-specific binaries. Both runtimes support unified configuration through RuntimeConfig struct.

Closes: #22
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.

2 participants