podman-image-sign(1)

πŸ“¦
version 6.1.4 Β· 5 versions
, in arch rolling, fedora 43, fedora 44, ubuntu resolute

πŸ’– podman-image-sign β€” the manual page, but make it cute πŸ’–

okay so bestie, welcome to podman-image-sign(1) from the General Commands Manual πŸŽ€ this is the whole page, every last crumb of it, just with 1000% more sparkle ✨


✨ NAME ✨

podman-image-sign β€” Create a signature for an image πŸ–ŠοΈ

🌸 SYNOPSIS 🌸

podman image sign [options] image [image ...]

πŸ’… DESCRIPTION πŸ’…

okay so podman image sign creates a local signature for one or more local images that have been pulled from a registry. no cap, that's the whole job 🫢

the signature gets written to a directory derived from the registry configuration files in $HOME/.config/containers/registries.d if that exists β€” otherwise /etc/containers/registries.d (unless it got overridden at compile-time, which is a thing that can happen, iykyk). go check containers-registries.d(5) for the deets πŸ“–

by default, the signature is written into /var/lib/containers/sigstore for root, and $HOME/.local/share/containers/sigstore for non-root users. lowkey neat 🌈


πŸ‘‘ OPTIONS πŸ‘‘

  • --all, -a β€” Sign all the manifests of the multi-architecture image (default false). it's giving "everybody gets a signature" πŸ’«
  • --authfile=path β€” Path of the authentication file. Default is ${XDG_RUNTIME_DIR}/containers/auth.json on Linux, and $HOME/.config/containers/auth.json on Windows/macOS. This file is created by podman login. If the authorization state is not found there, $HOME/.docker/config.json is checked, which is set using docker login. πŸ”

Note: there's also the option to override the default path of the authentication file by setting the REGISTRY_AUTH_FILE environment variable. Do it like this: export REGISTRY_AUTH_FILE=path.

  • --cert-dir=path β€” Use certificates at path (*.crt, *.cert, *.key) to connect to the registry. (Default: /etc/containers/certs.d) For details, see containers-certs.d(5). πŸŽ€
heads up bestie: this option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines 😭
  • --directory, -d=dir β€” Store the signatures in the specified directory. Default: /var/lib/containers/sigstore πŸ“
  • --help, -h β€” Print usage statement. the classic "what do I do now" button πŸ™ˆ
  • --sign-by=identity β€” Override the default identity of the signature. main character energy, but for your keyring πŸ‘‘

πŸ”₯ EXAMPLES πŸ”₯

Sign the busybox image with the identity of foo@bar.com with a user's keyring and save the signature in /tmp/signatures/. slay πŸ’–

$ sudo podman image sign --sign-by foo@bar.com --directory /tmp/signatures docker://privateregistry.example.com/foobar

$ sudo podman image sign --authfile=/tmp/foobar.json --sign-by foo@bar.com --directory /tmp/signatures docker://privateregistry.example.com/foobar

the write (and read) location for signatures is defined in YAML-based configuration files in /etc/containers/registries.d/ for root, or $HOME/.config/containers/registries.d for non-root users. when signing an image, Podman uses those configuration files to determine where to write the signature, based on the name of the originating registry or a default storage value β€” unless you override it with the --directory option. periodt πŸ’…

for example, consider the following configuration file:

docker:
  privateregistry.example.com:
    sigstore: file:///var/lib/containers/sigstore

when signing an image preceded with the registry name 'privateregistry.example.com', the signature is written into sub-directories of /var/lib/containers/sigstore/privateregistry.example.com. and the use of 'sigstore' also means the signature is 'read' from that same location on a pull-related function. it's the same house for reading and writing, iconic 🏠✨


⭐ SEE ALSO ⭐

containers-certs.d(5), containers-registries.d(5)


πŸ“œ HISTORY πŸ“œ

November 2018, Originally compiled by Qi Wang (qiwan at redhat dot com) 🫢


and that's the whole podman-image-sign(1) page bestie, from the General Commands Manual, originally compiled back in November 2018 β€” go forth and sign your images, you absolute legend πŸ‘‘πŸ’– no cap

πŸ“¦ where this page comes from