buildah-mkcw(1)

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

πŸ’– buildah-mkcw β€” the manual page, but make it cute πŸ’–

okay bestie, welcome to buildah-mkcw, a page from the General Commands Manual section of the buildah universe. it's a subcommand page, so the whole thing lives under the big buildah umbrella. buckle up, we're turning regular container images into confidential ones πŸ”₯


✨ NAME ✨

buildah-mkcw β€” turn a totally normal, conventional container image into a confidential workload image. glow up, but for TEEs πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

buildah mkcw [options] source destination

πŸ‘‘ DESCRIPTION πŸ‘‘

so here's the tea: buildah mkcw takes the contents of a container image and builds a brand new image out of them β€” one that's actually built for life inside a trusted execution environment (TEE). usually you'd run that kind of thing with krun (which is just crun compiled with the libkrun feature turned on, and invoked as krun, iykyk).

and here's the wild part: the new image does not have the conventional contents anymore. nope. instead, its root filesystem contains an encrypted disk image plus configuration information for krun. that's the whole vibe. πŸ”

🌸 source 🌸

a container image β€” could be chillin' locally, could be livin' in a registry. either one, we love that for you.

🌸 destination 🌸

a container image β€” also local, also registry-friendly. no cap.


πŸŽ€ OPTIONS πŸŽ€

  • --add-file source[:destination] β€” reads the contents of the file at source and drops it into the committed image as a file at destination. if you don't give a destination, it just uses the path of source. the new file is owned by UID 0, GID 0, has 0644 permissions, and gets a current timestamp. you can stack this option as many times as you want, periodt.
  • --attestation-url, -u url β€” where the key broker / attestation server lives. if you give it a value, the new image's workload ID plus the passphrase used to encrypt the disk image get registered with the server, and the server's location gets stored in the container image. at run-time, krun is expected to hit up that server to get the passphrase back using the workload ID, which is also stored in the container image. if you don't specify a value, then you must specify a passphrase value. no skipping both, bestie 🫢
  • --base-image, -b image β€” an alternate image to use as the base for the output image. by default the scratch non-image is used. iconic default honestly.
  • --cpus, -c number β€” how many virtual CPUs the image expects to be run with at run-time. if you don't say, a default value will be supplied. ✨
  • --firmware-library, -f file β€” the location of the libkrunfw-sev shared library. if you don't specify it, buildah goes looking for it in a bunch of hard-coded locations. it's giving detective energy πŸ”
  • --memory, -m number β€” how much memory the image expects to be run with at run-time, expressed as a number of megabytes. if you don't specify, a default value will be supplied. πŸ’–
  • --passphrase, -p text β€” the passphrase used to encrypt the disk image that gets included in the container image. if you don't specify a value, but you did specify an --attestation-url value, a randomly-generated passphrase will be used instead. also, the authors' official recommendation: set an --attestation-url but don't set a --passphrase. do with that what you will πŸ‘€
  • --slop, -s {percentage%|sizeKB|sizeMB|sizeGB} β€” extra space to allocate for the disk image, on top of the size of the container image's contents. you can express it as a percentage (something like ..%) or as a size value (bytes, or bigger units if you tack on suffixes like KB or MB) β€” or even as a sum of two or more of those specifications. if you don't specify anything, buildah just guesses that 25% more space than the contents will be enough, but this option exists for when its guess is simply wrong. and heads up: if the specified or computed size comes out less than 10 megabytes, it gets bumped up to 10 megabytes. respect the minimum 🧚
  • --type, -t {SEV|SNP} β€” which type of trusted execution environment (TEE) the image should be marked for. accepted values are "SEV" (AMD Secure Encrypted Virtualization - Encrypted State) and "SNP" (AMD Secure Encrypted Virtualization - Secure Nested Paging). if you don't specify, it defaults to "SNP". ⭐
  • --workload-id, -w id β€” a workload identifier that gets recorded in the container image, used at run-time to retrieve the passphrase that encrypted the disk image. if you don't specify one, a semi-random value gets derived from the base image's image ID. main character energy, auto-generated 😌

🌈 SEE ALSO 🌈

  • buildah(1) β€” go read the parent page, bestie, it's the whole ecosystem πŸ’œ

πŸŽ€ reminder that mkcw is literally make confidential workload. you're not just building images, you're building secret images. ate. πŸ’…

and that's the whole page, fr fr. this one shipped as part of buildah, dated July 2023, straight from the General Commands Manual. go forth and encrypt something, my love πŸ¦‹βœ¨πŸ’–

πŸ“¦ where this page comes from