Logo

dev-resources.site

for different kinds of informations.

Podman 3 and Docker Compose - How Does the Dockerless Compose Work?

Published at
12/28/2024
Categories
docker
podman
containers
Author
mkdev_me
Categories
3 categories in total
docker
open
podman
open
containers
open
Author
8 person written this
mkdev_me
open
Podman 3 and Docker Compose - How Does the Dockerless Compose Work?

Since Podman version 3 there is a docker compose support!

For a long time, Podman didn't have exactly the same convenient and quick way to create a multi-container local environment. You had two options:

Use a separate Python-based podman-compose tool, that promises to work seemlessly and without any modifcations

Or use a rather awkward podman generate kube command, which gives you a Kubernetes pod definition. You can then run this yaml with podman play command - awesome idea, in theory.

Now with the new major release, there is no need for extra tools, we can just use Podman and regular docker-compose to run the docker compose files. You heard me right - we still need to install docker-compose itself.

01

Let's give it a try - I am using docker compose for developing Transcripto, check out our Making a Product show to learn more about how we built this service.

According to documentation, I first need to enable a podman socket, which requires root privileges.

Then I need to verify that docker socket is listening - that's kind of weird. Naturally, it does not work, because I've stopped the docker daemon beforehand.

After digging into the documentation a bit deeper, I learned that I need to install a podman-docker package. This package is basically a bunch of symlinks and various hacks ro make it look like you are using docker, while you are actually using podman.

When I tried to install it, I quickly learned that I have to remove, quite naturally, remove the docker package from my system. Well, if I can use docker-compose with podman, I probably don't need docker itself anyway.

With all the packages in place, I've restarted the podman socket and now the docker socket is also listening. If you check where the docker socket is going, you will see that it basically maps to podman socket, as expected.

I've tried to run docker-compose and got a permission denied error. Apparently, I need to run this as a root. So much for rootless containers here.

The second error I got, somehow misleading, was a lack of disk space. I have a lot of disc space, so there must be something. Quickly realizing that the ownership and labeling of files must be wrong due to previously installed docker, I removed some temporal files.

On the text attempt, docker-compose finally succeeded.

It looks and works exactly like you would expect from docker-compose, but the underlying container engine is Podman now.

02

Ignoring few minor issues, I could quickly replace Docker with Podman for this project, and my development experience stayed the same. Give it a try, it has never been a better time to taste the Dockerless world.


Here's the same article in video form for your convenience:

.

podman Article's
30 articles in total
Favicon
Nextcloud on Raspberry Pi - Fedora + Podman Quadlets
Favicon
Podman 3 and Docker Compose - How Does the Dockerless Compose Work?
Favicon
Rootless Containers: What They Are and Why You Should Use Them
Favicon
The Complete Podman vs Docker Analysis: Features, Performance & Security
Favicon
Exploring Podman and Beyond: Open Source Alternatives to Docker for Secure Containerization
Favicon
Is Dockerโ€™s Market Being Eroded? An In-Depth Comparison of Docker, ServBay, Homebrew, Podman, and MAMP
Favicon
Monitor container with Portainer
Favicon
Beyond Docker: Exploring Buildah and Podman for Container workflows
Favicon
Switching from docker to podman on Ubuntu
Favicon
How to Deploy a Fast API Application to a Kubernetes Cluster using Podman and Minikube
Favicon
Podman basics for beginners
Favicon
One Minute: Compose
Favicon
How to Install and Use Podman on Debian 12
Favicon
Pi-Hole setup using Quadlets
Favicon
Docker Vs Podman: A Comparison
Favicon
Exploring Podman Alternatives: A Deep Dive into Podman vs. Docker
Favicon
Instalando Podman no Ubuntu 22.04 LTS
Favicon
Podman and Docker: Deciphering the Pros and Cons of Each
Favicon
Containerization in Application Development: Choosing Between Podman and Docker
Favicon
Choosing the Right Containerization Tool: Docker, Podman, or Apptainer?
Favicon
Migrating from Docker to Podman: A Comprehensive Guide
Favicon
Allow low privileged ports inside podman container
Favicon
Podman/Docker container with a (GUI) remote desktop VNC on Raspberry PI 4
Favicon
Smallest Docker Image - 92B
Favicon
Docker vs Podman
Favicon
Transitioning from Docker to Podman: Navigating Challenges and Practical Solutions
Favicon
Cos'รจ Podman Desktop
Favicon
From Docker to Podman - VS Code DevContainers
Favicon
[ptbr] Podman, uma bela opรงรฃo.
Favicon
How to use PODMAN in place of docker in windows?

Featured ones: