Podman As Docker Replacement

On 2 min, 2 sec read

Quick Introduction To Podman

Many daemons run with root user privileges which can be a security vulnerability because of access to read any file, install programs and edit applications.

Podman allows a regular user to manager their pods (containers) without the need for root user privileges. Podman can be used as an alternative to Docker on Linux and other operating systems such as MacOS and Windows.

By default, Podman stores containers in your home folder. This could be an issue if the home folder is on a smaller drive or partition (common for smaller faster SSD Drives). It is possible to move the container storage to another location.

Podman was originally used to compile PHP for the Learning PHP eBook.

This tutorial will create a container that uses Fedora Linux and Apache Web Server to run a simple index.html

For this example, I will assume that Podman is installed on your platform of choice. A text document that contains all the commands a user could call to assemble an image is called a Dockerfile when using Docker. Podman can use any name for the reference and I will called it a Dockerfile so that Docker fans can follow along by replacing “podman” with “docker”.


Dockerfile




FROM fedora:latest
RUN dnf -y update && dnf -y install httpd git  && dnf clean all
COPY index.html /var/www/html/index.html
COPY index.html /var/www/html/index.html
ENTRYPOINT /usr/sbin/httpd -DFOREGROUND


Build And Run




podman build --tag fedora:myhttpd -f ./Dockerfile
podman run -p 8080:80 --name myhttpd --rm fedora:myhttpd


View

Open your web browser and point it to http:localhost:8080 and then wait for the HTML page to load.


Screenshots:

Podman Build Container
Podman Build Container

Podman Fedora Linux Container Running Apache Web Server
Podman Fedora Linux Container Running Apache Web Server

Conclusion:

In summary, Podman can be used a replacement for Docker. Podman uses the same commands as Docker and is daemonless, allowing a regular user to manage containers.


References:

🚀 Recommended Resources


Disclosure: Some of the links above are referral links. I may earn a commission if you make a purchase at no extra cost to you.

About Edward

Edward is a software engineer, author, and designer dedicated to providing the actionable blueprints and real-world tools needed to navigate a shifting economic landscape.

With a provocative focus on the evolution of technology—boldly declaring that “programming is dead”—Edward’s latest work, The Recession Business Blueprint, serves as a strategic guide for modern entrepreneurship. His bibliography also includes Mastering Blender Python API and The Algorithmic Serpent.

Beyond the page, Edward produces open-source tool review videos and provides practical resources for the “build it yourself” movement.

📚 Explore His Books – Visit the Book Shop to grab your copies today.

💼 Need Support? – Learn more about Services and the ways to benefit from his expertise.

🔨 Build it Yourself – Download Free Plans for Backyard Structures, Small Living, and Woodworking.