What is Containerisation?
Containerization is a lightweight virtualization technique that allows applications to run in isolated user spaces called containers, while sharing the same operating system kernel. To ensure that an application functions consistently in various environments, each container packages an application along with its dependencies, including libraries, binaries, and configuration files.
Containers lack a complete guest operating system, in contrast to conventional virtual machines (VMs). As a result, they are much quicker to launch, more resource-efficient, and simpler to scale.
What is Docker?
A major factor in the widespread adoption of containerization was the container platform Docker. Docker made it simpler for developers to package, distribute, and run applications consistently by hiding the complexity of Linux containers behind straightforward tooling and workflows.
Fundamentally, Docker makes it possible to bundle applications into portable container images with all necessary dependencies, including libraries, runtime components, and configuration files. Regardless of underlying infrastructure differences, these images can run on any Docker-compatible system. Long-standing issues with inconsistent environments throughout the stages of development, testing, and production were addressed by this portability.
Many of the conventions that characterize contemporary container workflows, such as image layering, declarative build instructions, and standardized registries for image distribution, were also established in part by Docker. Docker consequently became deeply ingrained in cloud platforms and development pipelines, impacting the creation of alternative runtimes and container orchestration systems.
Docker is still a crucial point of reference even though the container ecosystem has since grown with new tools and architectural strategies. Newer daemonless runtimes like Podman and other container-compatible technologies continue to rely on its image format and workflow conventions.
What is Podman?
Podman is an open-source container engine created for daemonless and rootless container development, management, and operation. Podman runs containers directly as the user's child processes, enhancing security and streamlining system architecture in contrast to conventional container platforms that depend on a long-running background service.
Because Podman is completely compatible with Docker images and current container standards, users can adopt it with little modification to their current workflows. Podman is a well-liked option in server and enterprise environments because of its emphasis on security, adherence to standards, and close integration with Linux system tools.
Docker vs Podman: Key Differences and Advantages
Both Docker and Podman support the same OCI-compliant image formats and offer container-based application workflows. However, their design philosophies diverge greatly, resulting in significant practical differences, especially in the areas of operational flexibility, security, and architecture.
Advantages on Podman over docker
1. Architecture: Daemon vs Daemonless
Docker is dependent on a central daemon that oversees every container and operates continuously in the background. This daemon serves as a single control point for container lifecycle operations and usually runs with elevated privileges.
In contrast, Podman lacks daemon. The Podman process launches containers directly, and they operate like regular Linux processes. This layout:
removes a single point of failure
decreases the complexity of the system
increases openness when examining active workloads
2. Security: Root vs Rootless Containers
In order to manage containers, Docker typically requires root-level privileges, which can expand the attack surface in the event that the daemon is compromised.
Rootless containers were a key component in the design of Podman. Containers can be used by users without root access, offering:
Improved user isolation
decreased chance of privilege escalation
Enhanced adherence to security-focused settings
Because of this, Podman is particularly appealing for enterprise deployments and multi-user systems.
3. Compatibility and Migration
Podman retains command-line compatibility with Docker in spite of architectural differences. Existing images can be reused without alteration, and many Docker commands remain unchanged. Instead of doing a complete migration, this enables teams to move to Podman gradually.
Moving from Docker to Podman
It's easy to switch from Docker to Podman, especially if you're already familiar with container workflows. The majority of current procedures can be carried over with little modification thanks to Podman's broad compatibility with Docker commands and image formats.
The installation, container creation, and operation of Podman on Ubuntu are all covered in the following steps.
Installing Podman on Ubuntu
First, update the package index and install Podman using the default Ubuntu repositories:
sudo apt update
sudo apt-get install podman
Once installed, you can verify the installation by checking the version:
podman --version
Unlike Docker, Podman does not require a background daemon, so no additional services need to be started.
Building a Container Image
Podman uses the same Dockerfile format, so existing Dockerfiles work without modification.
To build an image from a Dockerfile in the current directory:
podman build -t test-image .
This command behaves the same as docker build, creating a local image tagged as test-image.
Running a Container
- To run a container from the built image
First, we used the --name option to give the container a name. This facilitates future reference to the container.
podman run --name test-container test-image
- Running the Container with Port Mapping
Next, we used the -p flag to map the container's exposed port to a host port.
podman run --name test-container -p 8080:80 test-image
This maps port 80 inside the container to port 8080 on the host.
- Running the Container with Environment Variables
Finally, we passed environment variables at runtime using the -e option.
podman run \
--name test-container \
-p 8080:80 \
-e APP_ENV=production \
-e APP_PORT=80 \
test-image
The application inside the container has access to these environment variables without requiring modifications to the image itself.
Pushing and Pulling Images
Podman supports pushing and pulling images to and from container registries.
To push an image
podman push test-image
To pull an image
podman pull test-image
Similar to Docker, authentication and registry configuration adhere to standard container registry workflows.
Key Takeaway for Docker Users
Podman commands closely resemble Docker commands for the majority of daily tasks, such as creating images, executing containers, and interacting with registries. Because of this compatibility, teams can use Podman gradually while taking advantage of its rootless and daemonless design.

Top comments (0)