cookbook 'podman', '= 0.1.0'
podman (2) Versions 0.1.0 Follow0
Installs and manages Podman: containers, images, networks, volumes, pods, kube workloads and systemd units
cookbook 'podman', '= 0.1.0', :supermarket
knife supermarket install podman
knife supermarket download podman
Podman Cookbook
A Chef cookbook for Podman. It mirrors the public resource
surface of the Sous Chefs Docker cookbook (podman_container,
podman_image, podman_network, podman_volume, podman_service, ...) and
adds Podman-only resources for pods, kube play, secrets, Quadlet units,
generated systemd units and machines.
Podman is daemonless, so every resource drives the podman CLI instead of a
daemon API. Rootful and rootless operation, remote --url/--connection
access and TLS are supported on every resource.
Scope
- Install Podman from the distribution repositories together with the network stack and, where the distribution ships them, the Docker shim and CNI plugins.
- Manage containers, images, networks, volumes, pods, secrets and kube workloads.
- Generate systemd units, both with Quadlet and
podman generate systemd. - Stay on Podman itself: there are no Swarm resources, because Podman has no
native Swarm mode. Pods (
podman_pod) and Kubernetes manifests (podman_kube_play,podman_kube_generate) cover the same ground.
Requirements
- Chef Infra Client 18 or later
- Linux for the engine (remote clients can run anywhere)
- systemd for
podman_service_manager_systemd
Platform Support
The current release and its predecessor; older ones are dropped.
- AlmaLinux 9/10
- Amazon Linux 2023
- CentOS Stream 9/10
- Debian 12/13
- Fedora 42/43
- openSUSE Leap 15.6/16.0, Tumbleweed
- Oracle Linux 9/10
- Red Hat Enterprise Linux 9/10
- Rocky Linux 9/10
- Ubuntu 26.04/26.10
Unknown platforms fall back to podman_installation_script, which aborts when
it does not know the package manager.
Installation
podman_service 'default' do action %i(create start) end
podman_service installs packages and starts the socket-backed service. To skip
the service and only install:
podman_installation_package 'default' do action :create end
Other installers are podman_installation_script and
podman_installation_tarball; the generic podman_installation name resolves
to the script installer, as in the docker cookbook.
Rootless
Set run_as 'deploy' on container-like resources, or use the user units:
podman_service 'deploy' do user_mode true user 'deploy' action %i(create start) end
Rootless operation requires subuid/subgid entries; the package installer
adds uidmap (Debian/Ubuntu) or shadow-utils (RPM).
Resources
| Resource | Purpose |
|---|---|
[podman_container](documentation/podman_container.md) |
Containers |
[podman_exec](documentation/podman_exec.md) |
Commands inside a container |
[podman_image](documentation/podman_image.md) |
Pull, build, import, push, save, load, remove images |
[podman_image_prune](documentation/podman_image_prune.md) |
Remove unused images |
[podman_tag](documentation/podman_tag.md) |
Tag images |
[podman_network](documentation/podman_network.md) |
Networks, connect/disconnect |
[podman_volume](documentation/podman_volume.md) |
Volumes |
[podman_volume_prune](documentation/podman_volume_prune.md) |
Remove unused volumes |
[podman_registry](documentation/podman_registry.md) |
Registry login |
[podman_pod](documentation/podman_pod.md) |
Pods |
[podman_kube_play](documentation/podman_kube_play.md) |
Deploy/tear down Kubernetes YAML |
[podman_kube_generate](documentation/podman_kube_generate.md) |
Render Kubernetes YAML |
[podman_secret](documentation/podman_secret.md) |
Secrets |
[podman_quadlet](documentation/podman_quadlet.md) |
Quadlet systemd units |
[podman_generate_systemd](documentation/podman_generate_systemd.md) |
podman generate systemd units |
[podman_machine](documentation/podman_machine.md) |
Podman machines (VM clients) |
[podman_service](documentation/podman_service.md) |
Install + API service |
[podman_service_base](documentation/podman_service_base.md) |
Shared service-manager settings |
[podman_service_manager_systemd](documentation/podman_service_manager_systemd.md) |
systemd socket/service units |
[podman_service_manager_execute](documentation/podman_service_manager_execute.md) |
Background podman system service
|
[podman_installation_package](documentation/podman_installation_package.md) |
Package installation |
[podman_installation_script](documentation/podman_installation_script.md) |
Script installation |
[podman_installation_tarball](documentation/podman_installation_tarball.md) |
Static tarball installation |
Full property documentation lives in [documentation/](documentation/).
Alternative OCI runtimes
Besides crun, containers can run under gVisor (runsc) or a WASM runtime
(crun-wasm). runtime selects one per container or pod, runtimes on the
service registers the binary for Podman — see
[alternative runtimes](documentation/alternative-runtimes.md).
Remote connections
Every resource accepts host, connection, identity_path, root, runroot,
cgroup_manager, remote and the TLS properties, so they can target a remote
Podman service. For tcp: hosts the certificate properties become --tls-ca,
--tls-cert and --tls-key:
podman_container 'remote-web' do host 'tcp://podman.example.com:8443' tls_ca_cert '/etc/podman/ca.pem' tls_client_cert '/etc/podman/cert.pem' tls_client_key '/etc/podman/key.pem' repo 'nginx' action :run end
Notes
- Podman's defaults differ from Docker's. The default runtime is
crun, networking uses netavark, andlog_driveris unset unless specified. -
restart_policyandautoremoveconflict, as in Docker. -
podman_containerrecreates a container when a property changes; it does not patch a running container in place.
Development
cookstyle chef exec rspec
Integration suites live in kitchen.yml, each with InSpec controls under
test/integration/<suite>. They need a Linux driver and a real Podman
installation.
Credits
Thank you to the sous-chefs/docker
cookbook and its authors for the resource surface, documentation layout and
test structure that podman_* mirrors.
Without their work this cookbook would not exist.
License
Apache-2.0
Dependent cookbooks
This cookbook has no specified dependencies.
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
podman Cookbook CHANGELOG
This file lists changes per release.
The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.
0.1.0 (2026-11-22)
Initial release. The cookbook mirrors the public surface of the Sous Chefs
Docker cookbook for Podman and adds the resources Podman has beyond Docker.
Podman is daemonless, so every resource drives the podman CLI. The
Docker-compatible Podman API marks /plugins unsupported, so there is no
plugin resource.
Added
- Installation with
podman_installation_package(distribution packages, the default),podman_installation_script(bundled installer for unknown platforms) andpodman_installation_tarball(pinned static release with checksum verification), each with a matching delete action. -
podman_serviceto combine installation and the service, pluspodman_service_base,podman_service_manager_systemdandpodman_service_manager_execute(the former is also provided aspodman_service_manager). - Container, image, network, volume, exec, tag and registry-login resources with the Docker cookbook's properties and actions, including the Docker-only spellings as aliases.
- Podman-only resources:
podman_pod,podman_kube_play,podman_kube_generate,podman_quadlet,podman_secret,podman_generate_systemdandpodman_machine. -
podman_image_pruneandpodman_volume_prune. - Containers without
log_driverkeep the host's default log driver instead of being recreated against an assumedk8s-file. -
podman_service_manager_executestarts a rootless daemon as the socket owner instead of root, which served the wrong store, and removes a socket left behind by a killed daemon. -
podman_machineretries a boot that Podman gave up on, which happens on hosts without hardware virtualization. -
podonpodman_containerto join a pod (Podman 6 dropped resolving a pod name throughnetwork_mode container:<pod>). - Alternative OCI runtimes:
runtimeonpodman_containerandpodman_pod,runtime/runtimeson the service base to set a default and to register runtime binaries, plus documentation for gVisor (runsc) and crun-wasm. - Rootful and rootless operation, remote
--url/--connectionaccess, TLS material for the service managers and connection timeouts on every resource. - Documentation for every resource, ChefSpec unit tests, InSpec integration suites for each recipe and a GitHub Actions workflow that runs both.
- Supported platforms, current release and predecessor: AlmaLinux 9/10, Amazon Linux 2023, CentOS Stream 9/10, Debian 12/13, Fedora 42/43, openSUSE Leap 15.6/16.0 and Tumbleweed, Oracle Linux 9/10, RHEL 9/10, Rocky Linux 9/10, Ubuntu 26.04/26.10.
Notes
- Service settings live in
containers.conf.dandregistries.conf.ddrop-ins. There is no[storage]section incontainers.conf, so storage options go through--root/--storage-opt; there is noengine.groupeither, the group only appears in the socket unit. -
podman kube playhas no flag for a namespace, labels, environment or secrets, so those properties are folded intomanifest_content. With a manifest file they must already be part of the file. - The Docker daemon options
bip,fixed_cidr,iptables,labelsanddaemonare accepted but have no Podman equivalent; seedocumentation/podman_service_base.md. - There are no Swarm resources. Pods and kube manifests cover the same ground.