Docker to Podman
The landscape of container technology has been undergoing a significant transformation, particularly with Docker’s recent changes to its licensing model for enterprise users. This shift has prompted many organizations to reevaluate their container management solutions, driving a substantial migration towards Podman (Pod Manager).
This happened to me recently and a lot of my underlining tooling uses Docker under the hood. I don’t want to rewrite my tooling or wait for updates, so I want to install Podman, and use a docker alias so all my existing tools “just work”.
Embrace Podman, for reals
Skip this section if you dont care about why Podman is better than Docker. Its cool.
Get Chris Fryer’s stories in your inbox
Join Medium for free to get updates from this writer.
Podman encapsulates containers in a way that is both seamless and compatible with Docker, while also addressing some of the key challenges and limitations faced by Docker users. It’s designed to offer an easier transition for those accustomed to Docker, thanks to its similar command line interface and support for Dockerfile standards.
- Changes in Docker Licensing: With Docker altering its licensing model, enterprises are looking for cost-effective, open-source alternatives that don’t compromise on functionality or security.
- Daemonless Architecture: Unlike Docker, Podman doesn’t depend on a central daemon, which enhances its security profile and reduces potential attack surfaces.
- Rootless Operations: Podman’s support for running containers without root privileges addresses major security concerns, making it a favorite amongst system administrators and DevOps professionals.
- Seamless Docker Compatibility: Podman supports Docker’s commands and Dockerfiles, making the transition less daunting for teams accustomed to Docker’s ecosystem.
Installing Podman
Windows & Macos
For those using non-Linux platforms, Podman Desktop offers a unified experience, bridging the gap with a user-friendly graphical interface for managing containers. It simplifies container development and deployment across platforms, ensuring that transitioning from Docker Desktop is as smooth as possible. Use this method, it installs Podman Desktop and it will also setup Docker Compose and Kubernetes support if you need it.
Linux
Podman is native to Linux and supports a variety of distributions. Here’s how you can install it on some of the most popular ones:
# Add Podman's repository
sudo sh -c "echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_$(lsb_release -rs)/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list"
# Download the GPG key
wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/xUbuntu_$(lsb_release -rs)/Release.key -O Release.key
# Add the GPG key
sudo apt-key add - < Release.key
sudo apt-get update -qq
# Install Podman
sudo apt-get -qq -y install podmanNote: You will need to setup Podman Desktop yourself here too.
Setting up a terminal Alias
To further ease the transition, you can alias Docker commands to Podman in your shell profile. This allows you to continue using familiar Docker commands, which Podman will interpret and execute.
MacOS / *Nix
- Open your terminal.
- Add the alias to your
.zshrcor.bash_profilefile:
echo "alias docker='podman'" >> ~/.zshrc
source ~/.zshrcWindows
- Open PowerShell.
- Create a new alias:
Set-Alias -Name docker -Value podmanUpdate: SSL And Certificate Errors
Where I work, I need a company zscaler cert to access https resources such as dockerhub so that I can actually pull down container images. I get SSL errors and it just fails. Here is an example error:
Trying to pull docker.io/library/keydb:latest...
Error: initializing source docker://keydb:latest: pinging container registry
registry-1.docker.io:
Get "https://registry-1.docker.io/v2/": tls: failed to verify certificate:
x509: certificate signed by unknown authorityYou have two main options to move past this, use a tls ignore flag or install the certificate to Podman:
Use the Flag
Podman has a flag you can include to ignore ssl errors called tls-verify which is used like so:
podman run -d --tls-verify=false postgresInstall the Cert:
Podman supplies some good documentation for this that I wont bother duplicating here: https://github.com/containers/podman/blob/main/docs/tutorials/podman-install-certificate-authority.md
Update: Podman 5.1 and ARM Compatibility
Podman’s continued evolution brings an exciting development with the release of Podman 5.1, particularly for developers working on ARM-based systems, such as the Apple M series CPUs found in the latest Mac computers. This version introduces ARM compatibility, a significant enhancement that allows running x86 containers on ARM architectures seamlessly. Docker has had this feature for a while, and it worked great.
Why is this Important?
This development is a game-changer for developers and teams working across a variety of hardware ecosystems. It essentially resolves compatibility issues that were previously a challenge when moving containerized applications between x86 (common in desktops and servers) and ARM-based systems (increasingly popular in laptops and edge devices due to their efficiency).
Running x86 containers on ARM with Podman 5.1 doesn’t require any additional configuration. Podman automatically detects the architecture mismatch and uses QEMU to run the containers. However, you should note that while this feature greatly enhances flexibility, performance might not be on par with running containers natively due to the overhead introduced by emulation.
To take advantage of this feature, ensure you have Podman 5.1 or later installed on your ARM-based system. If you’re using an older version of Podman, refer to the installation instructions provided earlier in this article to upgrade to the latest version.
Conclusion
Transitioning from Docker to Podman should help you use the same tooling and commands you know and love, without the added Docker license headache.
The introduction of ARM compatibility in Podman 5.1 marks a significant milestone for containerization technology, offering broader flexibility and supporting a more inclusive range of computing environments.
Stay tuned to the Podman release notes and documentation to keep abreast of new features and improvements, ensuring you’re leveraging the most out of your container management tool.







