What Is New in Podman 3.1
Podman 3.1 delivers significant enhancements to the container experience, focusing on improved Docker compatibility, new features for pods, and a more robust toolchain. This release bridges functionality gaps with Docker and introduces native capabilities that simplify container management workflows.
| Category | Key Changes |
|---|---|
| New Features | Docker Compose support, New Pod commands, Init containers for pods |
| Improvements | Enhanced Docker CLI compatibility, Better volume support, Improved systemd integration |
| Bug Fixes | Numerous fixes across images, containers, pods, and the remote client |
| Deprecations | The podman pod create --share option |
How does Podman 3.1 improve Docker compatibility?
The headline feature is the introduction of a podman-compose script. This allows you to use standard
Docker Compose YAML files to bring up complex multi-container applications directly with Podman, no Docker
daemon required. It's a major step forward for developers transitioning their workflows.
Beyond compose, this release adds support for several Docker CLI commands that were previously missing. You can
now use podman image prune and podman container prune to clean up unused objects,
mirroring the familiar Docker cleanup process.
What new pod capabilities were added?
Podman 3.1 introduces the concept of init containers for pods. These are short-lived containers that run to completion before the main application containers in the pod start. They are perfect for running setup scripts, waiting for a database to be ready, or migrating data.
New commands provide finer control over pod management. podman pod clone creates a copy of an
existing pod, which is incredibly useful for testing and debugging configurations. The existing
podman pod create command also gained a --replace flag to automatically replace any
existing pod with the same name.
What enhancements were made to volumes and storage?
Volume support saw key improvements, particularly with the podman volume create command. You can now
use the --opt o=size option to specify a size for a volume when using the `overlay` driver, giving
you control over storage allocation.
The handling of anonymous volumes was also refined. When a container is removed, its anonymous volumes are now automatically pruned as well, preventing the accumulation of unused storage and keeping the system clean.
How is the remote client experience better?
The remote client for Mac and Windows received substantial attention. The core podman command on
these platforms now supports the system connection subcommand, allowing you to easily manage
connections to remote Podman machines directly from the client.
Under the hood, the Varlink API has been fully removed in favor of the REST API. This consolidation simplifies the codebase and ensures all communication is handled through a single, modern API endpoint, improving stability for remote operations.
What about systemd and rootless operation?
Integration with systemd is more robust. The podman generate systemd command now produces more
reliable unit files that handle container restarts and failures better. This matters because it solidifies
Podman's position for running production workloads with proper service management.
Rootless mode continues to be a focus. While already stable, numerous under-the-hood tweaks across the codebase further improve the performance and reliability of running containers without root privileges, making it the default choice for many developers.
FAQ
Can I really use my existing docker-compose.yml files with Podman 3.1?
Yes, for the most
part. The new podman-compose script aims to be a drop-in replacement for many common use cases. You
might encounter edge cases with very advanced compose features, but for standard web apps with databases and
volumes, it works well.
What is the practical use for init containers in a pod?
Init containers solve the problem of
dependency ordering. A typical use case is having an init container that runs a schema migration script against
a database. Only after that init container succeeds and exits will the main application container, which depends
on the new schema, start up.
I use the remote client on my Mac. Do I need to do anything about the Varlink removal?
No,
the transition should be seamless. The Podman machine on your Mac has already been updated to use the REST API.
Your existing remote client will automatically communicate using the new API without any required configuration
changes on your part.
Why was the --share option for pod creation deprecated?
The --share option was
deprecated in favor of a more explicit and flexible model. Instead of a single flag, you now use specific flags
like --share-net, --share-ipc, etc., to control exactly which Linux namespaces are
shared within a pod. This gives you finer control over pod isolation.
How do I prune unused images and containers now?
Podman 3.1 adds the
podman image prune and podman container prune commands. These work just like their
Docker counterparts, allowing you to easily clean up dangling images and stopped containers to free up disk
space. You can use the -a flag to remove all unused images, not just dangling ones.