Podman on macOS
It’s time to replace Docker Desktop with Podman on macOS.
Why doing this change?
I don’t need a GUI for running a simple container and I won’t continue to use soemthing that needs root permission during it’s install/upgrade process.
Also with the big change: Docker Desktop no longer free for large companies: New ‘Business’ subscription is here
In addition, I use podman to run containers on my workstation, servers and orchestrator (Nomad) so it’s more logic to uniformize the stack.
Install
The easy way is using Homebrew
Now, we need to setup the machine
In my case, I’ve to customize it:
- cpu: 2 cores (default: 1)
- memory: 4 GB (1024 * 4) (default: 2 GB = 2048)
- Disk: 50 GB (default: 10 GB)
Default values are sufficient if you’re not doing hard work.
I haven’t added a custom name so it’ll use the default podman-machine-default
How to start and stop
I use aliases in my ~/.zshrc
Quick fix
Do I need it?
After starting using podmanstart
, we’ll try to use port forwarding:
If curl fails with this meesage
)
You need to apply the fix after doing this clean stop
Fix
The fix for port forwarding is adding this lien in ~/.config/containers/containers.conf
"cni"
All done, you can work correctly and you can replace docker-compose with podman-compose