podman-image-trust(1)
π podman-image-trust(1) - Manage container registry image trust policy π
β¨ NAME β¨
Okay bestie, listen up! This is podman-image-trust β the literal icon of container registry image trust policy. It manages which registries you trust as a source of container images, periodt. π
π SYNOPSIS π
podman image trust set|show [options] registry[/repository]
π¦ DESCRIPTION π¦
So here's the tea: this tool manages which registries to trust as a source of container images based on its location. Lowkey important: this option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines. π
The location is determined by the transport and the registry host of the image. Using this container image docker://docker.io/library/busybox as an example, docker is the transport and docker.io is the registry host. Iykyk.
Trust is defined in /etc/containers/policy.json and is enforced when a user attempts to pull a remote image from a registry. The trust policy in policy.json describes a registry scope (registry and/or repository) for the trust. This trust can use public keys for signed images. π
The scope of the trust is evaluated from most specific to the least specific. In other words, a policy may be:
- Defined to an entire registry.
- Defined to a particular repository in that registry.
- Defined to a specific signed image inside of the registry.
The following list are examples of valid scope values used in policy.json from most specific to the least specific:
docker.io/library/busybox:notlatest
docker.io/library/busybox
docker.io/library
docker.io
If no configuration is found for any of these scopes, the default value (specified by using "default" instead of REGISTRY[/REPOSITORY]) is used. Slay.
Trust type provides a way to:
- Allowlist (
"accept") or Denylist ("reject") registries - Require a simple signing signature (
βsignedByβ) - Require a sigstore signature (
"sigstoreSigned")
Trust may be updated using the command podman image trust set for an existing trust scope. π
π OPTIONS π
π --help, -h π
Print usage statement. Classic.
π set OPTIONS π
--pubkeysfile,-f=KEY1β A path to an exported public key on the local system. Key paths are referenced inpolicy.json. Any path to a file may be used but locating the file in/etc/pki/containersis recommended. Options may be used multiple times to require an image be signed by multiple keys. The--pubkeysfileoption is required for thesignedByandsigstoreSignedtypes. π--signature-policy=pathβ Path to the signature policy file (policy.json) that Podman updates. This option is required forset.--type,-t=valueβ The trust type for this policy entry. Accepted values:signedBy(default): Require simple signing signatures with corresponding list of public keyssigstoreSigned: Require sigstore signatures with corresponding list of public keysaccept: do not require any signatures for this registry scopereject: do not accept images for this registry scope
π show OPTIONS π
--json,-jβ Output trust as JSON for machine parsing. π€--noheading,-nβ Omit the table headings from the listing.--rawβ Output trust policy file as raw JSON.--signature-policy=pathβ Path to the signature policy file (policy.json) to display. When omitted, Podman resolves the policy path from the system configuration the same way it selects a policy for image pulls.
π EXAMPLES π
Accept all unsigned images from a registry:
sudo podman image trust set --signature-policy /etc/containers/policy.json --type accept docker.io
Modify default trust policy:
sudo podman image trust set --signature-policy /etc/containers/policy.json -t reject default
Display system trust policy:
podman image trust show
TRANSPORT NAME TYPE ID STORE
all default reject
repository docker.io/library accept
repository registry.access.redhat.com signed security@redhat.com https://access.redhat.com/webassets/docker/content/sigstore
repository registry.redhat.io signed security@redhat.com https://registry.redhat.io/containers/sigstore
repository docker.io reject
docker-daemon accept
Display trust policy file:
podman image trust show --raw
{
"default": [
{
"type": "reject"
}
],
"transports": {
"docker": {
"docker.io": [
{
"type": "reject"
}
],
"docker.io/library": [
{
"type": "insecureAcceptAnything"
}
],
"registry.access.redhat.com": [
{
"type": "signedBy",
"keyType": "GPGKeys",
"keyPath": "/etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release"
}
],
"registry.redhat.io": [
{
"type": "signedBy",
"keyType": "GPGKeys",
"keyPath": "/etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release"
}
]
},
"docker-daemon": {
"": [
{
"type": "insecureAcceptAnything"
}
]
}
}
}
Display trust as JSON:
podman image trust show --json
[
{
"transport": "all",
"name": "* (default)",
"repo_name": "default",
"type": "reject"
},
{
"transport": "repository",
"name": "docker.io",
"repo_name": "docker.io",
"type": "reject"
},
{
"transport": "repository",
"name": "docker.io/library",
"repo_name": "docker.io/library",
"type": "accept"
},
{
"transport": "repository",
"name": "registry.access.redhat.com",
"repo_name": "registry.access.redhat.com",
"sigstore": "https://access.redhat.com/webassets/docker/content/sigstore",
"type": "signed",
"gpg_id": "security@redhat.com"
},
{
"transport": "repository",
"name": "registry.redhat.io",
"repo_name": "registry.redhat.io",
"sigstore": "https://registry.redhat.io/containers/sigstore",
"type": "signed",
"gpg_id": "security@redhat.com"
},
{
"transport": "docker-daemon",
"type": "accept"
}
]
π SEE ALSO π
π HISTORY π
- January 2019, updated by Tom Sweeney (tsweeney at redhat dot com)
- December 2018, originally compiled by Qi Wang (qiwan at redhat dot com)
And that's the vibe check, bestie! This was podman-image-trust(1) from the General Commands Manual. Stay slay and keep your registries trusted! πβ¨π¦
π¦ where this page comes from
- arch rolling: podman-docker 6.1.4-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms