Init podman on MacOS
Prerequisites
Section titled “Prerequisites”You need the homebrew package manager for this:
brew install docker docker-compose sqlcl
Upgrade tolerant way of adding SQLcl to your PATH (add it to your ~/.bashrc or ~/.zshrc):
SQLCLPATH=$(ls -t $(brew --prefix)/Caskroom/sqlcl | head -1)PATH=$(brew --prefix)/Caskroom/sqlcl/$SQLCLPATH/sqlcl/bin:$PATH
Read this for more information.
Installing Podman
Section titled “Installing Podman”If you have no Docker runtime yet, I recommend doing the following:
brew install podman
podman machine init
# I recommend increasing the resources if you have enoughpodman machine set --memory 4096podman machine set --cpus 3
podman machine start
# if it says something like:
# The system helper service is not installed; the default Docker API socket# address can’t be used by podman. If you would like to install it, run the following commands:# sudo /opt/homebrew/Cellar/podman/5.3.1/bin/podman-mac-helper install# podman machine stop; podman machine start
# Please do so
Now test if you can run podman via the docker command:
docker ps
Troubleshooting
Section titled “Troubleshooting”If this does not work please follow this guide.
If you have this file ~/.docker/config.json
, delete or rename it if you see this error: error getting credentials - err: exec: "docker-credential-desktop": executable file not found in $PATH
.
Alternatively, you can try using podman
commands like:
podman-compose up -dpodman-compose stoppodman ps# etc
But podman-compose can cause some trouble in my experience.
After a restart
Section titled “After a restart”After a restart of your Mac, you need to start the Podman machine again:
podman machine start
Equally you can stop it with:
podman machine stop
But I recomment stopping the database before stopping the Podman machine:
local-23ai.sh stop