Compatibility
Podman Desktop’s Docker compatibility feature lets the Docker CLI and tools that talk to the Docker socket, such as Testcontainers, Maven or Gradle, run against a Podman engine. Compose v2 applications run through the Compose extension, so docker compose up works on Podman.
How the socket is wired depends on the platform:
- macOS: the
podman-mac-helperutility links/var/run/docker.sockto the Podman machine’s socket. The Third-Party Docker Tool Compatibility setting that does this is on by default. - Windows: Podman also listens on the default
docker_enginenamed pipe. - Linux: point tools at Podman with the
DOCKER_HOSTvariable.
Before you switch
- Start a Podman machine.
- Turn on Settings > Preferences > Docker Compatibility. A Docker Compatibility page then appears under Settings.
- On that page, check the system socket status, pick the Docker CLI context, and use Setup… next to Podman Compose CLI Support if Compose is not installed.
- Check that
docker info --format=json | jq -r .ServerVersionreturns the Podman version. - Bring over containers you want to keep: export each one with
docker export <container> -o <archive>.tar, then runpodman import <archive>.tar. - Where tools do not find the socket, set
DOCKER_HOST:unix://plus the output ofpodman machine inspect --format '{{.ConnectionInfo.PodmanSocket.Path}}'on macOS, or ofpodman info --format '{{.Host.RemoteSocket.Path}}'on Linux, andnpipe://plus the PodmanPipe path on Windows. Adocker context create podman --docker "host=..."context works too.
Pitfalls
- An imported container comes back as an image, not a running container.
podman importlists it under Images, and you start a new container from it. The guide does not cover volumes, networks or Docker Desktop’s Kubernetes cluster. - The Third-Party Docker Tool Compatibility setting exists only on macOS. Re-enabling it asks for your machine password and a restart of the Podman machine.
- On Windows,
podman composecan fail withError: socket of machine is not setuntilDOCKER_HOSTis set. - The guide asks you to keep your Compose file in a working directory such as your home directory.