Skip to main content

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

Procedure

  1. Install the podman-mac-helper tool. Run the command:

    $ brew install podman-mac-helper
  2. Set up the podman-mac-helper service for each user. Run the command:

    $ podman-mac-helper setup
  3. (Optional) Import your existing containers into Podman. Run the command for each container archive:

    $ podman import <your_container_archive>.tar

Verification

  1. Your tools communicating to the Docker socket, such as Maven or Testcontainers, communicate with Podman without reconfiguration.

  2. Use the podman-mac-helper tool to run commands. To run a command with Podman by using the podman-mac-helper tool, prefix the command with podman-mac-helper.

    Example:

    $ podman-mac-helper run -it <your_container> bash

Additional resources