Back to blog

Docker vs Podman: Migration and Best Practices

November 15, 2025 Dedimarco
docker podman linux devops
Docker vs Podman: Migration and Best Practices

Migrating from Docker to Podman is an increasingly common decision among system administrators. Here is a feedback report based on several production migrations.

Why Podman?

Podman offers several significant advantages:

  • No daemon: rootless architecture by default
  • Systemd quadlets: native container management as services
  • Docker compatibility: commands are almost identical
  • Security: no need for a root user to run containers

Step-by-Step Migration

1. Converting Dockerfiles

Dockerfiles remain compatible. Simply rename Dockerfile to Containerfile (optional):

FROM node:22-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install --production
COPY . .
EXPOSE 3000
CMD ["node", "server.js"]

2. Systemd Quadlets

One of the most powerful features of Podman 5+ is native quadlet support:

[Container]
Image=docker.io/library/node:22-alpine
PublishPort=3000:3000
Volume=/data/myapp:/app

[Service]
Restart=always

[Install]
WantedBy=default.target

3. Bridge Network

Unlike Docker which creates a bridge by default, Podman requires explicit configuration:

podman network create mynetwork
podman run --network mynetwork ...

Common Pitfalls

IssueDockerPodman
Internal DNSAutomaticRequires podman network create
host.docker.internalWorksDoes not work, use gateway IP
Restart policy—restart alwaysVia systemd Restart=always
Build contextdocker buildpodman build (identical)

Conclusion

Migrating to Podman requires some adjustments, particularly around networking and service management. But systemd quadlets offer a much cleaner integration than third-party solutions like docker-compose.