Containerization is the modern method of software deployment. Whenever we hear about containers, the first thing that comes to mind is Docker. Docker is a container runtime that is popular and widely used in enterprises. Unfortunately, Docker has now moved from free software to a subscription-based one. Even though Docker allows small companies to use its runtime for free, Large enterprises with more than 250 employees and less than $10 million in annual revenue have to buy the Docker subscription to continue using it. This made many companies think about an alternative to Docker.
Podman is a project from Red Hat that is open source and free to download. It is a daemon-less container engine for developing, managing, and running containers on your Linux System. Containers can either be run as root or in rootless mode.
Users can download and use it for free without the need to purchase a license or subscription.
The best thing about Podman is its commands are similar to Docker. A person with docker can easily work with podman as well.
Command of Podman are similar to docker, The main difference is that instead of using "docker" to run commands we use "podman". Rest all are very similar to docker.
Installing podman directly from Ubuntu repository. The below command downloads and installs podman in Ubuntu OS
sudo apt-get -y install podman
Note : If podman is not listed by your package manager, then follow these steps
Source OS-release file( This is to source the OS version details. below commands will refer this detail to fins the exact version for your OS)
source /etc/os-release
Add the podman repository to your Server. Run the below commands.
sudo nano /etc/apt/sources.list.d/podman.list
deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_18.04/ /
Download the GPG key to make a trusted connection between your server and repository
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/Release.key | sudo apt-key add -
Once this is done. Update the apt database and install podman.
sudo apt-get update
sudo apt-get install -y podman
Run the below command to check the version of podman
podman --version
As we already discussed, podman commands are very similar to docker.
For example, in Docker, to pulling an image, we use the command
docker pull <image name>
In Podman the command will be
podman pull <image name>
You can see it's very close to the Docker command. This is what makes podman a great free and open-source alternative to Docker.
We are going to create an Nginx container using Podman. Our aim is to understand how close both podman and docker commands are.
Pull the Nginx image from repository
podman pull nginx
It will ask to choose one if multiple images are available. Choose one to continue
2. Check the downloaded images
podman images
3. Create a container using the downloaded image
podman run -p 8080:80 nginx
Now you can see Container is running . In order to access it, use the IP address of server and its port number
Podman is a great alternative to Docker. As Docker is moving to a subscription-based scheme, the popularity of Docker will increase in the future. Also, since podman is open source and compatible with most tools, like Kubernetes it will surely become a competition for Docker. Unfortunately, currently, podman does not support the Swarm cluster. We cannot use podman as a replacement to Docker Swarm. One more thing is as most companies already adopted docker as their standard containerization engine, it's less likely that they will ditch docker and opt for podman. Meanwhile, podman is an excellent tool for new projects as it's very close to docker in functionality and usage. As it is owned by red hat it can become more popular if Red hat markets it well and provides good support. In this current stage, podman is good for low to medium organization but for enterprise-level deployments, docker is better.
We have discussed podman, which is an awesome open-source alternative to docker. It is simple to set up and supports all major platforms like Linux, Windows, and Mac. Even though it is not as popular as Docker, Its adoption will improve in the future, mainly because of Docker's new subscription-based model. As per my experience, it's a great tool to use and supports almost all the features that Docker provides.