Podman (An alternative to Docker !?!) 🦭
Published: 2022-09-11 09:16:43

---
title: Podman (An alternative to Docker !?!) 🦭
published: true
date: 2022-07-30 11:00:56 UTC
tags: 
canonical_url: 
---

#### Exploring new tech

#### What is Podman? 🤔

![Podman logo](https://cdn.hashnode.com/res/hashnode/image/upload/v1661621354394/y2heDM_cb.jpeg)

Podman is a daemonless, open source, Linux native tool for finding, running, building, sharing, and deploying applications that use Open Containers Initiative (OCI) Containers and Container Images.

> It operates very similar to Docker and is simple to set up.
> 
> Containers can run as root or in a rootless manner.

Documentation : [https://podman.io/](https://podman.io/)

### How different from Docker? 🐳

![Podman VS Docker](https://cdn.hashnode.com/res/hashnode/image/upload/v1661621356180/UzyCvGA7M.jpeg)

The primary distinctions between Docker and Podman (Pod Manager Tool) are as follows:

- **Daemonless** _This characteristic distinguishes itself from Docker, which executes operations via a docker daemon. Podman is lightweight and does not require an instance to be active at all times in order to execute containers._
- **Rootless** _Podman can be operated as root or as a non-root user. We can run Podman containers as non-root users while being compatible with container running._
- **Pods** _The word Pods was coined by Kubernetes. Pods are groups of containers that run as close together as feasible. Podman includes this capability by default for running many containers concurrently._

### Architecture 🏛:

![[Architecture] Docker VS Podman](https://cdn.hashnode.com/res/hashnode/image/upload/v1661621357724/Aulls7TgO.png)

> **_Many individuals still refer to a container as a Docker container._**

This does not accurately represent the existing container ecosystem. Docker generates OCI container images that may be used with different runtimes. _Kubernetes is one such example, as is Podman._

As a result, the essential functionality of Podman and Docker overlaps. Both generate images that may be used to run containers by the other. On top of the basic containerization functionality, the two runtimes provide their own specializations.

### Setup 

And as its OCI-compliant, Podman can be used as a drop-in replacement for the better-known Docker runtime. Most Docker commands can be directly translated to Podman commands.

> _Simply_ **_put alias as, docker=podman_** _on your machine and youre set_

Installation of Podman is pretty straightforward over a Mac. If youre on other OS, follow this [documentation](https://podman.io/getting-started/installation). WSL over Windows works.

Request admin access from Self-service app and then open terminal. The Mac client is available through [Homebrew](https://brew.sh/).

`brew install podman`

![Installing podman on MacOS](https://cdn.hashnode.com/res/hashnode/image/upload/v1661621360144/_oZnhQx-8q.png)

To start the Podman-managed VM:

`podman machine init`

And then

`podman machine start`

![Starting podman machine](https://cdn.hashnode.com/res/hashnode/image/upload/v1661621362263/XRFjIYp5B.png)

Once the installation is complete, you can then verify the installation information using:

`podman info`

![podman info](https://cdn.hashnode.com/res/hashnode/image/upload/v1661621364957/eT3S6g3Q2.png)

### TLDR 📌

As stated before, Podman is just an alias for docker. Whatever commands you can execute with docker, you can execute with Podman.

#### Building an Image

`podman build -t containername `

#### Docker file :

![Dockerfile](https://cdn.hashnode.com/res/hashnode/image/upload/v1661621367528/ZqaRJJE7f.png)

#### Image building via the command :

`podman build`

#### Push Image

`podman push registryname/imagename:tag`

#### List images

`podman images`

> Command screenshot :

![podman images](https://cdn.hashnode.com/res/hashnode/image/upload/v1661621370128/r3FrNemN0.png)

#### Run container

`podman run imagename`

> Command screenshot :

![Podman run](https://cdn.hashnode.com/res/hashnode/image/upload/v1661621372570/MfON-isSO.png)

#### Remove image

`podman rmi imagename`

> Command screenshot :

![Podman container](https://cdn.hashnode.com/res/hashnode/image/upload/v1661621375020/WOmGz_xTa.png)

#### Show Podman process status

`podman ps -a`

> Rest of the support commands is shown as below :

![Podman help](https://cdn.hashnode.com/res/hashnode/image/upload/v1661621381320/kgGEzVmxU.png)

If you use docker-compose , there is an alternative for this [podman-compose](https://github.com/containers/podman-compose).

> **_Note :_** _Natively docker-compose is yet not supported by Podman yet at the time of my testing of Podman Release v4.0.0 version. And the one available is very unreliable._

The setup is straightforward. Install Python if you dont already have it, and then podman-compose.

`brew install python@3.10pip3 install podman-compose`

Podman in conjunction with podman-compose works well.

Ive had trouble getting podman-compose over Mac because there isnt an official document for installation other than the one mentioned above.

### Conclusion 💁🏻

Podman wraps around Dockers capabilities to provide a lightweight container runtime that can be used in Daemonless and Rootless modes.

### Limitations of Podman 🥲

- Linux based.
- No support for Windows OS based Containers. _(Supported now with the help of WSL)_
- Docker-Compose component is still non-reliant
- No GUI unlike Docker Desktop, Rancher Desktop.
- New product with bugs and still coming features.
- No Docker Swarm.

That being said, Podman is still a new technology that is improving, and it may be best to wait and see until we see community acceptance of Podman and it becomes a more developed and reliable tool.

You can certainly experiment with it on your local workstations and learn more about it, but bringing it into your production system may take some time.

Please share your opinions about Podman and this topic in the comments section.

### Lets connect and chat! Open to anything under the sun 🏖🍹

Twitter : [devangtomar7](https://twitter.com/devangtomar7)  
LinkedIn : [devangtomar](https://www.linkedin.com/in/devangtomar)  
Stackoverflow : [devangtomar](https://stackoverflow.com/users/8198097/devangtomar)  
Instagram : [be\_ayushmann](https://instagram.com/be_ayushmann)  
Medium :

[Devang Tomar](https://medium.com/u/8f5e1c86129d?source=post_page-----e42119a306ca--------------------------------)