liveBook · Manning

Container image trust

As explained in Podman in Action: Secure, rootless containers for Kubernetes, microservices, and more

Image trust is a policy decision about which signed container images and signing keys a container engine accepts.

Container image trust is a policy decision that controls which registries, repositories, images, and signing keys Podman accepts. It provides a security boundary for image pulls and helps avoid disabling isolation with --privileged when access is denied. section 11.0 section 11.3

Podman evaluates trust policies from the most specific scope to the least specific:

  • Define policy for a specific signed image, repository, registry, or the default scope. section 11.3
  • Store the policy in /etc/containers/policy.json; run podman image trust commands as root on Linux. section 11.3

Reject a registry, then allow one repository

sudo podman image trust set -t reject docker.io sudo podman image trust set -t accept docker.io/library podman pull alpine The first policy rejects Docker Hub broadly; the more-specific docker.io/library rule allows the alpine pull while other repositories remain blocked. section 11.3

Require signed images

Configure a sigstore, export the signer’s public GPG key, and require it for a repository with podman image trust set -f /tmp/publickey.gpg quay.io/rhatdan. A signed image pulls successfully; an unsigned image from the same repository fails. section 11.3.1

How Podman in Action: Secure, rootless containers for Kubernetes, microservices, and more covers it

How deep it goes
Explains policy scopes, trust types, configuration files, commands, and signed-image infrastructure; stops short of broader container isolation mechanisms.
Examples
Demonstrates rejecting docker.io, allowing docker.io/library, and requiring signatures for quay.io/rhatdan images.
What it assumes
Assumes Linux and root access for policy commands; teaches registry scopes, trust types, GPG keys, and sigstore configuration.
What you can do after
Operate/configure Podman image policies and verify that signed or unsigned pulls are accepted or rejected as intended.
How it connects
Connects container registries, image signing, GPG keys, sigstores, policy.json, and Podman image pulls.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Podman in Action: Secure, rootless containers for Kubernetes, microservices, and more. The section links point to the parts of the book it draws on.