Podman is a container engine that enables users to manage OCI-compliant containers on Linux systems without the need for a daemon. It is popular among users as an alternative to Docker due to its ease of adoption. However, the lack of support for Docker Compose, a command-line tool that coordinates multiple Docker containers for local development, has been a major concern for many users and the container community. Podman starts to support docker-compose from version 3.0 but changes in docker-compose from version 2.0 made some incompatibilities, so a community project called Podman Compose has been born. Podman Compose processes the Compose spec and translates it into Podman CLI commands [1].
There are many articles that you can read about Podman vs Docker, but here I am going to share an experience to run Docker-compose with Podman. In the telecom field, many operators are using Red Had Linux (rhel 8 or 9) and Red Hat uses Podman because it is designed to be a more secure and efficient alternative to Docker.
Podman runs without the need for root privileges, which reduces the risk of security vulnerabilities caused by running containers with elevated permissions. Also, Podman is natively integrated with Red Hat’s container orchestration platform OpenShift, which makes it easier to deploy and manage containerized applications at scale.
Overall, Podman’s security, performance, and integration features make it a good fit for Red Hat’s container orchestration platform and their enterprise customers who are looking for a more secure and efficient solution to run containers. So, what if you need to use Docker-compose and re-use your YAML??
To use Podman with Docker-compose, I did some tricks. So far, I have not encountered any issues, but I will update if something goes wrong.
You need to follow below steps:
These are the version of OS and Podman which I used:
|
|
Then I run:
|
|
I tried with different version of Docker-compose, but among versions > 2, v2.3.3 seems ok with Podman.
[1] https://www.redhat.com/sysadmin/podman-compose-docker-compose