Skip to content

Init podman on MacOS

You need the homebrew package manager for these steps:

Terminal window
brew install sqlcl
# Optional: only if you want to use the docker CLI
# against Podman's Docker-compatible socket
brew install docker docker-compose

Add SQLcl to your PATH with these lines. They also work after an upgrade of SQLcl. Put them in your ~/.bashrc or ~/.zshrc:

Terminal window
SQLCLPATH=$(ls -t $(brew --prefix)/Caskroom/sqlcl | head -1)
PATH=$(brew --prefix)/Caskroom/sqlcl/$SQLCLPATH/sqlcl/bin:$PATH

Read this for more information.

If you have no Docker runtime yet, run these commands:

Terminal window
brew install podman
podman machine init
# Increase the memory and the CPUs if the host has enough
podman machine set --memory 4096
podman 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 make sure that podman works:

Terminal window
podman ps

The scripts of this project (install.sh, local-26ai.sh, and the scripts in ./scripts) detect Podman. If docker is not installed, they use podman and the native podman compose subcommand. You can run them without a change. If both Docker and Podman are installed, set CONTAINER_CLI to select Podman:

Terminal window
CONTAINER_CLI=podman ./install.sh

You can also send the docker commands of the scripts to the Docker-compatible socket of Podman. Make sure that this works with docker ps.

If this does not work, read this guide.

If you see this error, delete or rename the ~/.docker/config.json file: error getting credentials - err: exec: "docker-credential-desktop": executable file not found in $PATH.

You can also control the stack directly with the native podman compose subcommand:

Terminal window
podman compose up -d
podman compose stop
podman ps
# etc

Use the podman compose subcommand, not the standalone podman-compose package. That package does not support everything in the docker-compose.yml file of this project.

After a restart of your Mac, start the Podman machine again:

Terminal window
podman machine start

You can stop it with this command:

Terminal window
podman machine stop

Stop the database before you stop the Podman machine:

Terminal window
local-26ai.sh stop