Replacing Docker with Podman — Power of Podman — Cloudnweb

ganesh mani
Jun 21, 2019 · 4 min read

Yeah, you read it right… while Docker is a buzzword in the tech industry now. we will see the consequences of using it and how we can solve the problem with Podman. Replacing Docker with Podman — Power of Podman

Before going into the article, we will see what Docker it and How Docker works.

What is Docker?

Docker is a containerization platform where we can package our application with its libraries and dependencies inside the container. Docker Container is somewhat like a virtual machine.

Unlike a virtual machine, Docker container shares the same Linux kernel as the system.

Image for post
Image for post

How Docker works?

Let us first understand how docker works and we will see how we can overcome the problem of it using podman.

Image for post
Image for post

building blocks of docker are Docker CLI and Docker Daemon.

Docker CLI sends the commands to Docker Daemon where Docker Daemon push/pull the image from the registry.

Daemon makes the copy of images in the local container and maintains it. Essentially the Docker daemon does all the work with registries, images, containers, and the kernel. The Docker command-line interface (CLI) asks the daemon to do this on your behalf.

you can ask me, what is the problem with it. Actually, there are few,

Here comes the role of podman which solves most of the problem. What is podman anyway?

BTW, What is Podman?

Most importantly, there is no concept called daemon in podman. podman directly interact with Image registry, containers and image storage. with Linux kernel through the runC container runtime process (not a daemon).

Image for post
Image for post

you can ask me, what is a runC Container runtime process ? .

Above all, runC is a lightweight, portable container runtime. Docker is built on top of runC runtime container. Instead of using a daemon in podman, we directly use the runC runtime container.

Below is the diagram to explain how Docker works on top of runC container runtime.

Image for post
Image for post

Migrating from Docker to Podman

Firstly, migrating from Docker to Podman is very easy.

Let’s see the Podman implementation with a node.js application. you can learn how to containerize a node.js application with docker here

Containerizing a node.js application with Podman

Before building the container image. Install podman in your local machine.make sure you installed podman correctly by running the following command.

$ podman --version

Complete Source code for the application can be found in this repo

Once, you clone the repository in the local machine. Run the following command

$ podman build -t podmandemo .

Note: If you face any error such as No Registries is found. Do the following steps.(Only if you face this error)

$ cd /etc/containers/ $ sudo nano registries.conf

Add in the [] and save the file

Image for post
Image for post

Now, run the build command again

Image for post
Image for post

Once Image built Successfully, run the image with the following command.

Image for post
Image for post

After that, visit the url http://localhost:3333. you will see something like

Image for post
Image for post

That’s it. Podman runs the image without any daemon process.

Image for post
Image for post

Originally published at on June 21, 2019.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store