Five podman features you didn’t know about

or that you should consider start using
πŸ‘‹πŸ»

whoami


🦭

what is podman?


  • ⚑ Fast and Light
  • πŸ”’ Secure
  • πŸ’™ Open
  • 🧩 Compatible
πŸ€”

why should I use podman?


  • πŸ‘Ή Daemonless
  • πŸ’™ Fully free and open source
  • πŸš€ Awesome
✏️

autocompletion


  • 🧐 podman inspect --format ...
  • 🀝 podman --connection ...


Let's try it ourselves

✨ Demo!
πŸ“₯

podman auto-update


  • πŸ‘” podman auto-update
  • βͺ podman auto-update --rollback
πŸ‘” podman auto-update

Container must run inside a systemd unit

  • io.containers.autoupdate{/$container}
    • registry
    • local
  • AutoUpdate={registry,local}


Do you know what quadlets are?
πŸ”’ quadlets
  • Run Podman containers under systemd
  • Declarative
πŸ”’ quadlets
  • ~/.config/containers/systemd
    • my-awesome-application.container
    • data.volume
    • internal.network
  • systemctl --user daemon-reload
  • systemctl --user start my-awesome-application.service
πŸ”’ quadlets

podman run --name devconf-quadlet \
    --rm -d \
    -p 80:8080 \
    quay.io/libpod/alpine:latest
                        

[Container]
ContainerName=devconf-quadlet
Image=quay.io/libpod/alpine:latest
PublishPort=80:8080

[Service]
Restart=always
                        
There might be the time for a demo at the end of the presentation
βͺ podman auto-update --rollback

Container must run inside a systemd unit

  • --sdnotify=container
  • io.containers.sdnotify{/$container}
    • conmon
    • container
  • Notify=true


Let's check a demo, shall we?

✨ Demo!

Check the demo in demo/auto-update

Check the demo in demo/auto-update
πŸ§‘β€βš•οΈ

podman healthcheck


  • πŸƒ podman run
  • πŸ”„ podman update
  • πŸ™‹ podman healthcheck
πŸƒ podman run
  • --health-cmd
  • --health-interval
  • --health-log-destination
  • --health-max-log-count
  • --health-max-log-size
  • --health-retries
  • ...
πŸ”„ podman update
  • --health-cmd
  • --health-interval
  • --health-log-destination
  • --health-max-log-count
  • --health-max-log-size
  • --health-retries
  • ...
πŸ”„ podman update
  • --health-log-destination
    • local
    • directory
    • events_logger
πŸ™‹ podman healthcheck run
Let's see how it works

✨ Demo!

Check the demo in demo/healthcheck
πŸ”—

Integrations


  • πŸ›« Cockpit
  • πŸ›‹οΈ Ansible
  • 😏 More, if we have time...
πŸ›« Cockpit

                            $ sudo dnf install -y cockpit-podman
                            $ sudo systemctl start cockpit
                        
Visit http://localhost:9090
Containers Panel
Container Creation Panel
Container Healthcheck Panel
πŸ›‹οΈ Ansible
Run Podman through Ansible and let it do the work

                            $ sudo dnf install -y ansible
                            $ ansible-galaxy collection install containers.podman
                        

---
  - name: Setup some containers as a good example
    hosts: localhost
    gather_facts: false
    vars:
      container_name: "devconf-ansible"
      container_image: "fedora:latest"

    tasks:
      - name: Create a container volume
        containers.podman.podman_volume:
          name: "{{ container_name }}-volume"
          state: present

      - name: Create a container network
        containers.podman.podman_network:
          name: "{{ container_name }}-network"
          subnet: "172.0.0.0/24"
          driver: bridge
          state: present

      - name: Create a container Pod
        containers.podman.podman_pod:
          name: "{{ container_name }}-pod"
          network: "{{ container_name }}-network"
          state: started

      - name: Create the DevConf container
        containers.podman.podman_container:
          name: "{{ container_name }}"
          image: "{{ container_image }}"
          volumes:
            - "{{ container_name }}-volume:/root:Z"
          env:
            YEAR: 2025
          interactive: true
          healthcheck: echo \"Thank you for being at DevConf $YEAR!\"
          healthcheck_interval: "2s"
          healthcheck_retries: 5
          healthcheck_start_period: "2s"
          state: started
                        

✨ Demo!
Check the demo in demo/ansible
🧩

all the other features


  • πŸ•ΉοΈ Kube Play and Compose
  • πŸ”’ Quadlets

✨ Demo!

Check the demo in demo/compose

Check the demo in demo/ansible

☺️ Thank You

Thanks to the podman team for your amazing work.

Meet us in our community meetings 🏘️


I am Nicola Sella, the source code of this is on codeberg/inknos/DevConf25, I go on Github as @inknos and I talk on Matrix as @nsella:fedora.im

πŸ“š References