umoci-unpack(1)(#)
β¨ umoci-unpack β¨
okay so bestie, welcome to umoci-unpack, section 1 of the umoci manual π. this one's by Aleksa Sarai, dated SEPTEMBER 2018, and it's literally the page that unpacks your OCI image into a runtime bundle. strap in π
πΈ NAME πΈ
umoci unpack β unpacks an OCI image tag into a runtime bundle. no cap, that's the whole job π
π¦ SYNOPSIS π¦
umoci unpack --image=image[:tag] [--rootless] [--uid-map=value] [--uid-map=value] [--keep-dirlinks] bundle
(yes, --uid-map=value really does show up twice in there. i don't make the rules, i just relay them π)
π DESCRIPTION π
so what it actually does: it extracts all of the layers β deterministically, bestie, meaning the same input gives you the same output every time β¨ β into an OCI runtime bundle at the path bundle. and while it's at it, it also generates an OCI runtime configuration that corresponds to the image's configuration, so your container actually knows what it is π
and there's more!! an mtree(8) specification gets generated at the time of unpacking, which is the whole reason umoci-repack(1) can generate filesystem deltas later on β and that is what lets you create layered OCI images π§ it's giving ecosystem, it's giving teamwork, i'm obsessed π
π OPTIONS π
the global options are defined in umoci(1), go check those out too π«Ά
--image=image[:tag]β the OCI image tag that's gonna get extracted into the bundle.imagemust be a path to a valid OCI image, andtagmust be a valid tag in that image. if you don't hand over atag, it defaults to"latest". so generous of it β--rootlessβ turns on rootless unpacking support, which meansumoci-unpack(1)andumoci-repack(1)can both be used as an unprivileged user π using this flag implies--uid-map=0:$(id -u):1and--gid-map=0:$(id -g):1, and it also enables several features that fake parts of the unpacking in an attempt to generate an as-close-as-possible extraction of the filesystem.
lowkey important: it is almost always not possible to perfectly extract an OCI image with --rootless. but bestie, it will be as close as possible, and that's the vibe ππ
--uid-map=valueβ specifies a UID mapping to use while unpacking (and repacking) layers. this works in a similar fashion touser_namespaces(7), and it's of the formcontainer:host[:size].--gid-map=valueβ specifies a GID mapping to use while unpacking (and repacking) layers. same deal, used in a similar fashion touser_namespaces(7), and it's of the formcontainer:host[:size].--keep-dirlinksβ instead of overwriting directories which are links to other directories when higher layers have an explicit directory, it just writes through the symlink πΈ this option is inspired by rsync's option of the same name. iconic crossover, honestly π
π EXAMPLE π
the following downloads an image from a docker(1) registry using skopeo(1), unpacks said image, and then creates a new container using the extracted OCI runtime bundle with runc(8). then the image gets repacked with umoci-repack(1) β¨
% skopeo copy docker://opensuse/amd64:42.2 oci:image:latest
# umoci unpack --image image bundle
# runc run -b bundle ctr
[ container session ]
# umoci repack --image image bundle
and with --rootless you can do all of the above without root privileges π«Ά umoci will generate a configuration that works with rootless containers in runc(8). main character energy, fr fr π
% skopeo copy docker://opensuse/amd64:42.2 oci:image:latest
% umoci unpack --image image --rootless bundle
% runc --root $HOME/runc run -b bundle ctr
[ rootless container session ]
% umoci repack --image image --rootless bundle
π SEE ALSO π
umoci(1), umoci-repack(1), runc(8)
and that's the page, bestie π it's unpack, it lives in the umoci manual, it's umoci-unpack(1)(#) β written by Aleksa Sarai back in September 2018, still slaying to this day πβ¨
π¦ where this page comes from
- arch rolling: umoci 0.6.0-1 Β· Apache-2.0
- fedora 43: umoci 0.6.0-1.fc43 Β· Apache-2.0 AND MIT AND BSD-2-Clause AND BSD-3-Clause AND ISC
- fedora 44: umoci 0.6.0-3.fc44 Β· Apache-2.0 AND MIT AND BSD-2-Clause AND BSD-3-Clause AND ISC
- nixos 26.05: umoci 0.6.0
- nixpkgs unstable: umoci 0.6.0
- ubuntu stonking: umoci 0.6.0+ds-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms