How to Replace Docker with Podman on macOS
Replace Docker with Podman on macOS using a simple alias setup.
Podman works as a drop-in Docker replacement on macOS with near-100% command compatibility and no daemon requirement.
Install Podman
1
brew install podman
Initialize and start the Podman machine (required on macOS for Linux VM):
1
2
podman machine init
podman machine start
Verify installation:
1
podman info
Create Docker Alias
For permanent redirection, add to your shell configuration.
Zsh (default on modern macOS):
1
2
echo "alias docker=podman" >> ~/.zshrc
source ~/.zshrc
Bash:
1
2
echo "alias docker=podman" >> ~/.bashrc
source ~/.bashrc
For temporary testing (current session only):
1
alias docker=podman
Command Compatibility
All standard Docker commands work identically:
1
2
3
4
docker ps
docker run -d nginx
docker build -t myapp .
docker-compose up
Podman provides Docker API socket compatibility automatically, so Docker-based tools and SDKs work without modification.
Migrate Existing Images
Export from Docker:
1
docker save myimage:latest > myimage.tar
Import to Podman:
1
podman load < myimage.tar
For most workflows, rebuilding containers with Podman is simpler than transferring Docker data.
Key Differences
Podman runs daemonless and rootless by default, improving security and resource usage. Container state persists in user space, not a system daemon.
☕ Support My Work
If you found this post helpful and want to support more content like this, you can buy me a coffee!
Your support helps me continue creating useful articles and tips for fellow developers. Thank you! 🙏