← All insightsIntegration

How to use Podman with Trivy

CodeWizard Engineering · 31 March 2025 · 3 min read · Intermediate

Podman and Trivy are a common pairing in a modern DevOps stack. Here is how they fit together and a practical way to wire them up.

Where Podman fits

Podman runs OCI containers without a central daemon and supports rootless containers by default, with a Docker-compatible CLI and the ability to generate Kubernetes YAML from pods.

bash
podman run -d --name web -p 8080:80 nginx:alpine
podman generate systemd --new --name web > ~/.config/systemd/user/web.service
systemctl --user enable --now web

Where Trivy fits

Trivy is an open-source security scanner that finds CVEs, misconfigurations, secrets and license issues across container images, filesystems, Git repos, IaC and live Kubernetes clusters.

yaml
# trivy.yaml
severity:
  - HIGH
  - CRITICAL
vulnerability:
  ignore-unfixed: true
exit-code: 1

Making them work together

  • Prefer rootless containers and Quadlet/systemd for services
  • Use podman generate kube to bridge to Kubernetes
  • Gate on HIGH/CRITICAL with ignore-unfixed, then tighten over time
  • Scan images, IaC and filesystems - not just one surface

Want this pairing set up properly, with docs and handover? That is exactly the kind of work CodeWizard's embedded senior engineers do - and both Podman and Trivy have active community groups you can join for free.

Like where this is going?

Get hands-on help from the engineers who write these posts.

Book a free consult