Podman Desktop: A Docker Alternative for Developers
INTRODUCTION
What is podman?
Podman is an open source container, pod, and container image management engine. It was first released in 2017 by Red Hat and has since become a popular alternative to Docker.
Podman Desktop
Podman Desktop is a recently released graphical user interface (GUI) for Podman, supporting various operating systems like Linux, Windows, and macOS. It provides a user-friendly interface similar to Docker Desktop, making it easy for developers familiar with Docker to transition to Podman.
FAMILIAR COMMANDS
Podman provides a command line interface (CLI) familiar to anyone who has used the Docker Engine. Most users can simply alias Docker to Podman (alias docker=podman) without any problems
Here are some examples of Podman commands that are similar to Docker commands:
podman build: Builds a container image from a Dockerfile.
podman search: Searches for container images on a registry.
podman pull: Downloads a container image from a registry.
podman push: Pushes a container image to a registry.
podman run: Runs a container from an image.
podman start: Starts a stopped container.
podman stop: Stops a running container.
podman images: Lists all container images on the system.
podman ps: Lists all running and stopped containers
podman pod create/start/stop: Manage Pods…
Example of running an nginx container:
podman run -d -p 8080:80 --name app nginx
podman ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3110f7c73e97 docker.io/library/nginx:latest nginx -g daemon o... 2 seconds ago Up 2 seconds 0.0.0.0:8080->80/tcp app
ADVANTAGES OF PODMAN
Daemonless Architecture: Unlike Docker, Podman operates without a central daemon, enhancing security and reducing the overhead on your system. This architecture means that each container is run as a child process of the Podman command itself, isolating processes more effectively.
Rootless Containers: Podman enables users to run containers without requiring root privileges, a significant advantage in terms of security. This feature minimizes the risk of privilege escalation attacks, making your development environment safer.
Efficiency: Podman is more efficient than Docker, as it does not use a daemon.
Performance: Podman runs smoother and uses fewer resources than Docker.
Compatibility with Docker: Podman Desktop is designed to be fully compatible with Docker, allowing developers to use Docker CLI commands and Compose files with Podman without modification. This compatibility eases the transition for developers looking to switch from Docker to Podman.
DISADVANTAGES
Fewer features: Podman Desktop currently doesn't have all the features of Docker Desktop, like extensions and plugins.
Smaller community: Podman is a newer project than Docker, so it has a smaller community and less documentation.
CONCLUSION
Podman Desktop emerges as a powerful and user-friendly tool for managing containers. If you prioritize security and efficient resource utilization, Podman Desktop is definitely worth exploring.
PERSONAL EXPERIENCE
As a DevOps using Podman on Mac M1, I have observed the following:
Podman is significantly more lightweight than Docker, Podman take up less storage.
Podman is excellent at building images and running single containers. The efficient resource utilization make it a highly effective tool for these tasks.
However, Podman also has some limitations:
It can encounter issues when running docker-compose.yml files. To address this, you must install Docker's docker-compose or switch to using Kubernetes configuration files with Podman.
Notes: This article reflects my personal experience using Podman on Mac M1. Your experience may vary depending on your operating system and computer configuration.
Reference
We are a software development company based in Vietnam.
We offer DevOps development remotely to support the growth of your business.
If there is anything we can help with, please feel free to consult us.