PODMAN
🐳 Using Podman Instead of Docker¶
This project supports Podman as an alternative to Docker for container operations during development and deployment with azd.
✅ Quick Setup¶
1. Install Podman (if not already installed)¶
macOS:
Linux:
2. Initialize Podman Machine (macOS/Windows)¶
3. Set Up Docker Compatibility¶
Run the provided setup script:
Or manually add to your shell profile (~/.zshrc or ~/.bashrc):
Then reload your shell:
4. Verify Setup¶
docker --version
# Should output: podman version X.X.X
podman info
# Should show running Podman machine
🚀 Usage with azd¶
Once configured, all azd commands work seamlessly:
# Deploy with Podman (no changes needed)
azd up
# Build containers with Podman
azd package
# Deploy just the apps
azd deploy
🔧 How It Works¶
The preflight checks in devops/scripts/azd/helpers/preflight-checks.sh have been updated to:
- Detect container runtime: Checks for either
dockerorpodmancommands - Auto-configure: Sets up Docker compatibility if using Podman
- Seamless integration:
azduses the container runtime transparently
🐛 Troubleshooting¶
Podman machine not running¶
Docker command not found after setup¶
Reload your shell:
azd still looking for Docker¶
Ensure environment variable is set:
echo $DOCKER_HOST
# Should output: unix:///run/podman/podman.sock
export DOCKER_HOST="unix:///run/podman/podman.sock"
Permission issues with Podman socket¶
Check Podman socket permissions:
ls -la /run/podman/podman.sock
# or on macOS:
ls -la ~/Library/Containers/*/Data/run/podman/podman.sock
📚 Additional Resources¶
🔄 Switching Back to Docker¶
If you need to switch back to Docker:
- Remove/comment out the Podman configuration from your shell profile
- Install Docker Desktop
- Restart your terminal
The preflight checks will automatically detect and use Docker.