Skip to content

Conversation

@yepzdk
Copy link

@yepzdk yepzdk commented Jan 29, 2026

Summary

  • Auto-detect container runtime (podman/docker) with CONTAINER_CLI environment variable override
  • Dynamically detect running podman machine instead of assuming podman-machine-default
  • Add socket path detection for macOS, rootless Linux, and rootful setups
  • Generate podman-specific traefik config with correct gateway IP for TCP API access

Details

Container Runtime Detection

  • Podman takes precedence if both runtimes are installed
  • Override with CONTAINER_CLI=docker or CONTAINER_CLI=podman

Dynamic Podman Machine Detection (macOS)

  • Queries podman machine list to find the currently running machine
  • Works with any machine name (e.g., podman-machine-apple-hv, custom names)
  • Clear error message if no machine is running

Traefik Configuration

  • Docker: Uses socket-proxy for secure Docker socket access
  • Podman: Starts TCP API service in the VM, generates traefik-podman.yml with correct gateway IP

Test plan

  • Test itkdev-docker-compose traefik:start with Podman on macOS
  • Test itkdev-docker-compose traefik:start with Docker on macOS
  • Verify traefik dashboard accessible at http://traefik.local.itkdev.dk:8080
  • Test with non-default podman machine name

🤖 Generated with Claude Code

- Auto-detect container runtime (podman/docker) with CONTAINER_CLI override
- Detect running podman machine dynamically instead of assuming default name
- Add socket path detection for macOS, rootless Linux, and rootful setups
- Generate podman-specific traefik config with correct gateway IP
- Use COMPOSE_PROFILES to conditionally start socket-proxy for Docker only
- Replace hardcoded 'docker' commands with $CONTAINER_CLI throughout

Co-Authored-By: Claude Opus 4.5 <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.

2 participants