I’ve had some issues using podman as a complete Docker replacement. Especially
around exposing docker API as a socket. This is required for some libraries such
as dockertest. Library uses
environment variable and communicates with Docker daemon via the socket file
pointed by the environment variable.
I found lima as a good replacement. Lima is a VM solution that uses qemu behind the wheels. Getting started is fairly easy.
Delete docker for desktop
If you haven’t done already, uninstall docker for desktop.
brew uninstall --cask docker
Keep docker CLI. It is only a wrapper to communicate with docker backend. If you don’t have it, install it by:
brew install docker
Use Lima as Docker for Desktop Replacement
- First, Install lima
brew install lima.
- Start lima VM
- You will be prompted by a configuration selection. Choose
Open an editor to override the configuration.
- Copy the contents of examples/docker.yaml and replace it with prompted configuration.
DOCKER_HOSTthe way it is logged.
Here is an example result of the start command:
INFO READY. Run `lima` to open the shell. INFO To run `docker` on the host (assumes docker-cli is installed): INFO $ export DOCKER_HOST=unix:///Users/halil/.lima/default/sock/docker.sock INFO $ docker ...
Test it out
docker info should print information about the VM lima runs.