Using the podman-mac-helper
tool to migrate from Docker to Podman on macOS
Consider using podman-mac-help
to migrate transparently to Podman on macOS.
- Continue using familiar Docker commands.
- Take advantage of the benefits of Podman on macOS.
- Your tools, such as Maven or Testcontainers, communicate with Podman without reconfiguration.
The podman-mac-helper
tool provides a compatibility layer that allows you to use most Docker commands with Podman on macOS.
The service redirects /var/run/docker
to the fixed user-assigned UNIX socket location.
Prerequisites
macOS
(Optional) You saved your existing Docker containers by running the command:
$ docker save <your_container> > <your_container_archive>.tar
Docker service is paused and Start Docker Desktop when you log in is disabled, or Docker is uninstalled.
Procedure
Install the
podman-mac-helper
tool. Run the command:$ brew install podman-mac-helper
Set up the
podman-mac-helper
service for each user. Run the command:$ podman-mac-helper setup
(Optional) Import your existing containers into Podman. Run the command for each container archive:
$ podman import <your_container_archive>.tar
Verification
Your tools communicating to the Docker socket, such as Maven or Testcontainers, communicate with Podman without reconfiguration.
Use the
podman-mac-helper
tool to run commands. To run a command with Podman by using thepodman-mac-helper
tool, prefix the command withpodman-mac-helper
.Example:
$ podman-mac-helper run -it <your_container> bash