Init podman on MacOS
Prerequisites
Section titled “Prerequisites”You need the homebrew package manager for these steps:
brew install sqlcl
# Optional: only if you want to use the docker CLI# against Podman's Docker-compatible socketbrew install docker docker-composeAdd SQLcl to your PATH with these lines. They also work after an upgrade of SQLcl. Put them in your ~/.bashrc or ~/.zshrc:
SQLCLPATH=$(ls -t $(brew --prefix)/Caskroom/sqlcl | head -1)PATH=$(brew --prefix)/Caskroom/sqlcl/$SQLCLPATH/sqlcl/bin:$PATHRead this for more information.
Installing Podman
Section titled “Installing Podman”If you have no Docker runtime yet, run these commands:
brew install podman
podman machine init
# Increase the memory and the CPUs if the host has 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 soNow make sure that podman works:
podman psThe 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:
CONTAINER_CLI=podman ./install.shYou can also send the docker commands of the scripts to the Docker-compatible socket of Podman.
Make sure that this works with docker ps.
Troubleshooting
Section titled “Troubleshooting”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:
podman compose up -dpodman compose stoppodman ps# etcUse 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
Section titled “After a restart”After a restart of your Mac, start the Podman machine again:
podman machine startYou can stop it with this command:
podman machine stopStop the database before you stop the Podman machine:
local-26ai.sh stop