Switching from Docker Desktop to Podman on macOS
If you’re considering moving away from Docker Desktop on macOS, Podman is a great open-source alternative that offers similar functionality without the licensing restrictions. Here’s a guide to help you transition smoothly.
Why Switch to Podman?
Docker Desktop has become a paid product for many users, which has led to increased interest in open-source alternatives. Podman is a daemonless container engine that is compatible with Docker CLI commands, making it easier to switch without changing your workflow significantly.
Rootless Containers
Podman allows you to run containers as a non-root user, enhancing security and reducing the risk of privilege escalation.
Compatibility with Docker CLI
Podman supports many Docker CLI commands, so you can use familiar commands like podman run
, podman build
, and podman push
.
Podman Compose
Podman Compose is a tool that allows you to use Docker Compose files with Podman, making it easier to manage multi-container applications. Or you can use docker compose
directly with Podman, as a drop-in replacement.
Podman AI Lab
Podman AI Lab is an exciting new feature that provides containerized AI tools and models, making it easier to experiment with AI in a containerized environment.
Installing Podman on macOS
You can install Podman on macOS using Homebrew. Or download it from the Podman Desktop website.
They suggest installing via the installer package, which includes everything you need to get started.
Common Issues and Solutions
Because I was using Docker/Orbstack for a long time, I had some issues with Podman. Here are some common problems and their solutions:
- Publishing Images: The
--push
flag inpodman build
doesn’t work as expected. Instead, usepodman push
after building the image. - Multi-Platform Builds: Podman supports multi-platform builds. But it’s up to you to create a
manifest
that includes the different architectures you want to support.
# build and push hello-world
podman manifest create ghcr.io/simonneutert/hello-world:latest
podman buildx build -f Dockerfile \
--manifest ghcr.io/simonneutert/hello-world:latest \
--platform linux/amd64,linux/arm64 .
podman manifest push --all ghcr.io/simonneutert/hello-world:latest
while for Docker/Orbstack, you can do it in one command:
docker buildx build -f Dockerfile \
--platform linux/amd64,linux/arm64 \
-t ghcr.io/simonneutert/hello-world:latest \
--push .
Using Claude/ChatGPT
Claude and ChatGPT can be valuable tools in your transition to Podman. They can help you troubleshoot issues, generate configuration files, and even automate parts of your workflow. By integrating these AI models into your development process, you can streamline your container management tasks and improve your overall efficiency.
Conclusion
Switching from Docker Desktop to Podman on macOS is mostly a straightforward process. Despite a few hiccups, I learned a lot about containers from a new perspective. Podman offers a robust, open-source alternative that aligns well with the needs of developers looking for flexibility and control over their container environments. With its compatibility with Docker CLI commands and support for rootless containers, Podman is a compelling choice for macOS users seeking an open-source solution.
The Podman AI Lab is an exciting addition, just as ollama and Docker AI - but with a focus on isolation and security.
Read next ➡️