buildah-manifest(1)

πŸ“¦
version 1.45.0 Β· 5 versions
, in centos-stream 10, centos-stream 9, debian trixie, fedora 43, fedora 44, opensuse-leap 16.0, ubuntu questing

πŸ’– buildah-manifest β€” the group chat for your manifest lists πŸ’–

okay so bestie, welcome to buildah-manifest(1), from the General Commands Manual section. this is the page that tells you how to wrangle manifest lists and image indexes, and honestly? it's giving multi-arch main character energy. ✨


🌸 NAME 🌸

buildah-manifest β€” Create and manipulate manifest lists and image indexes.


πŸŽ€ SYNOPSIS πŸŽ€

buildah manifest COMMAND [OPTIONS] [ARG...]

πŸ¦‹ DESCRIPTION πŸ¦‹

so the buildah manifest command is basically a whole friend group of subcommands, and together they can do all of this:

  • Create a working Docker manifest list or OCI image index.
  • Add an entry to a manifest list or image index for a specified image.
  • Add an entry to an image index for an artifact manifest referring to a file.
  • Add or update information about an entry in a manifest list or image index.
  • Delete a working container or an image.
  • Push a manifest list or image index to a registry or other location.

like, it does so much. periodt. πŸ’…


πŸ‘‘ SUBCOMMANDS πŸ‘‘

every subcommand has its own man page, and here's the whole roster, no skips, no cap:


🌈 EXAMPLES 🌈

🧚 Building a multi-arch manifest list from a Containerfile

okay so assuming the Containerfile uses RUN instructions, the host needs a way to execute non-native binaries. configuring that is beyond the scope of this example, so don't come for me. but building a multi-arch manifest list shazam in parallel across 4-threads? literally can be done like this:

$ platarch=linux/amd64,linux/ppc64le,linux/arm64,linux/s390x
$ buildah build --jobs=4 --platform=$platarch --manifest shazam .
Note: the --jobs argument is optional, and the --manifest option should be used instead of the -t or --tag options. iykyk. πŸ’–

πŸ“ Assembling a multi-arch manifest from separately built images

ok so assuming example.com/example/shazam:$arch images are built separately on other hosts and pushed to the example.com registry, they may be combined into a manifest list, and pushed using a simple loop:

$ REPO=example.com/example/shazam
$ buildah manifest create $REPO:latest
$ for IMGTAG in amd64 s390x ppc64le arm64; do
          buildah manifest add $REPO:latest docker://$REPO:IMGTAG;
      done
$ buildah manifest push --all $REPO:latest
Note: the add instruction argument order is <manifest> then <image>. also, the --all push option is required to ensure all contents are pushed, not just the native platform/arch. do not forget this one bestie, it will humble you. 😭

πŸ’œ Removing and tagging a manifest list before pushing

special care is needed when removing and pushing manifest lists, as opposed to the contents. you almost always want to use the manifest rm and manifest push --all subcommands. for example, a rename and push could be performed like this:

$ buildah tag localhost/shazam example.com/example/shazam
$ buildah manifest rm localhost/shazam
$ buildah manifest push --all example.com/example/shazam

πŸ”₯ SEE ALSO πŸ”₯

buildah(1), buildah-manifest-create(1), buildah-manifest-add(1), buildah-manifest-remove(1), buildah-manifest-annotate(1), buildah-manifest-inspect(1), buildah-manifest-push(1), buildah-manifest-rm(1)


ok that's the whole page bestie, you ate that 🫢 this was buildah, from way back in September 2019, and you just finished reading buildah-manifest(1). slay, go build something multi-arch. πŸ’…βœ¨

πŸ“¦ where this page comes from