umoci-raw-runtime-config(1)(#)

πŸ’… umoci-raw-runtime-config πŸ’…

okay bestie, this is the umoci-raw-runtime-config manual page from the runtime-config section of the umoci manual. written by Aleksa Sarai back in DECEMBER 2016 (an icon, truly). let's get into it 🫢


✨ NAME ✨

umoci raw runtime-config β€” generate an OCI runtime configuration for an image 🌸


✨ SYNOPSIS ✨

umoci raw runtime-config --image=image[:tag] [--rootfs=rootfs]
[--rootless] config

umoci raw config --image=image[:tag] [--rootfs=rootfs] [--rootless]
config

✨ DESCRIPTION ✨

so basically, this generates a brand new OCI runtime configuration straight from an image, without extracting the rootfs of that image. the config gets written to the path you pass as config, and yes, it will just overwrite whatever's already sitting there, no hesitation, no apology πŸ’….

this is literally one of the operations that umoci-unpack(1) does when it's building a runtime bundle. but like… extracting a whole root filesystem is so much overhead, and if you don't actually want to use that rootfs, running umoci-unpack(1) over and over is not it. hence this command exists, slay ✨

some fields genuinely need a root filesystem as a "source of truth", and you can hand one over with --rootfs. the other flags do the exact same things they do with umoci-unpack(1). no cap.

⚠️ but listen β€” the output of umoci-raw-runtime-config(1) is not necessarily identical to the output of umoci-unpack(1). this is especially true if you don't pass --rootfs, because then umoci(1) leaves fields in the runtime spec at their defaults whenever computing their values would need the root filesystem as a source-of-truth. so like, don't come for me if they differ 😭

✨ OPTIONS ✨

the global options are defined in umoci(1) β€” go check those out too bestie.

  • --image=image[:tag] β€” the OCI image tag that's gonna be extracted into the bundle. image has to be a path to a valid OCI image, and tag has to be a valid tag in that image. if you don't give tag, it defaults to "latest" πŸ’–
  • --rootfs=rootfs β€” use rootfs as a secondary source of truth while generating the runtime configuration (this is especially important for Config.User conversion). if you leave it unspecified, any runtime fields that need a secondary source of truth to be filled in will just be left at their default values. which, yeah, may result in discrepancies between the output of umoci-unpack(1) and umoci-raw-runtime-config(1). you've been warned 🫢
  • --rootless β€” generate a rootless container configuration, similar to the configuration umoci-unpack(1) produces when you give it the --rootless flag. twin behavior fr fr πŸ‘‘

✨ EXAMPLE ✨

the following downloads an image from a docker(1) registry using skopeo(1), and then generates the config.json for that image. iconic.

% skopeo copy docker://opensuse/amd64:42.2 oci:image:latest
% umoci raw runtime-config --image image:latest config.json

if a root filesystem is already present, you can specify it with the --rootfs flag. this will source the root filesystem for conversion operations that necessitate it. so handy 🌈

% skopeo copy docker://opensuse/amd64:42.2 oci:image:latest
# umoci unpack --image image bundle
% umoci raw runtime-config --image image --rootfs bundle/rootfs config.json

✨ SEE ALSO ✨

umoci(1), umoci-repack(1), runc(8) πŸ¦‹


and that's the whole page bestie!! this one lives in the raw section of the umoci manual β€” umoci-raw-runtime-config(1)(#) β€” version-wise it's just umoci, and it's been sitting here since DECEMBER 2016. periodt πŸ’–πŸŽ€βœ¨

πŸ“¦ where this page comes from