github.com/opencontainers/umoci@v0.4.8-0.20240508124516-656e4836fb0d/doc/man/umoci-raw-unpack.1.md (about)

     1  % umoci-raw-unpack(1) # umoci raw unpack - Unpacks an OCI image tag into a root filesystem
     2  % Aleksa Sarai
     3  % SEPTEMBER 2018
     4  # NAME
     5  umoci raw unpack - Unpacks an OCI image tag into a root filesystem
     6  
     7  # SYNOPSIS
     8  **umoci raw unpack**
     9  [*umoci-unpack(1) flags*]
    10  *rootfs*
    11  
    12  # DESCRIPTION
    13  Extracts all of the layers (deterministically) to a root filesystem at path
    14  *rootfs*. This path *must not* already exist.
    15  
    16  # OPTIONS
    17  The global options are defined in **umoci**(1), while the options for this
    18  particular subcommand are identical to **umoci-unpack**(1) with the exception
    19  that the *rootfs* path is provided rather than a *bundle* path.
    20  
    21  # EXAMPLE
    22  The following downloads an image from a **docker**(1) registry using
    23  **skopeo**(1), unpacks said image to a root filesystem, generates an OCI
    24  runtime configuration file with **umoci-raw-runtime-config**(1) and then
    25  creates a new container with **runc**(8).
    26  
    27  ```
    28  % skopeo copy docker://opensuse/amd64:42.2 oci:image:latest
    29  # umoci raw unpack --image image rootfs
    30  # umoci raw runtime-config --image image --rootfs rootfs config.json
    31  # runc run ctr
    32  [ container session ]
    33  ```
    34  
    35  With **--rootless** it is also possible to do the above example without root
    36  privileges. **umoci** will generate a configuration that works with rootless
    37  containers in **runc**(8).
    38  
    39  ```
    40  % skopeo copy docker://opensuse/amd64:42.2 oci:image:latest
    41  % umoci raw unpack --image image --rootless rootfs
    42  % umoci raw runtime-config --image image --rootfs rootfs --rootless config.json
    43  % runc --root $HOME/runc run ctr
    44  [ rootless container session ]
    45  ```
    46  
    47  # SEE ALSO
    48  **umoci**(1), **umoci-raw-runtime-config**(1), **runc**(8)