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

     1  % umoci-repack(1) # umoci repack - Repacks an OCI runtime bundle into an image tag
     2  % Aleksa Sarai
     3  % DECEMBER 2016
     4  # NAME
     5  umoci repack - Repacks an OCI runtime bundle into an image tag
     6  
     7  # SYNOPSIS
     8  **umoci repack**
     9  **--image**=*image*[:*tag*]
    10  [**--no-history**]
    11  [**--history.comment**=*comment*]
    12  [**--history.created_by**=*created_by*]
    13  [**--history.author**=*author*]
    14  [**--history-created**=*date*]
    15  [**--refresh-bundle**]
    16  *bundle*
    17  
    18  # DESCRIPTION
    19  Given a modified OCI bundle extracted with **umoci-unpack**(1) (at the given
    20  path *bundle*), **umoci-repack**(1) computes the filesystem delta for the OCI
    21  bundle's *rootfs*. The delta is used to generate a delta layer, which is then
    22  appended to the original image manifest (that was used as an argument to
    23  **umoci-unpack**(1)) and tagged as a new image tag. Between a call to
    24  **umoci-unpack**(1) and **umoci-repack**(1) users SHOULD NOT modify the OCI
    25  image in any way (specifically you MUST NOT use **umoci-gc**(1)).
    26  
    27  All **--uid-map** and **--gid-map** settings are implied from the saved values
    28  specified in **umoci-unpack**(1), so they are not available for
    29  **umoci-repack**(1).
    30  
    31  If **--no-history** was not specified, a history entry is appended to the
    32  tagged OCI image for this change (with the various **--history.** flags
    33  controlling the values used). To view the history, see **umoci-stat**(1).
    34  
    35  Note that the original image tag (used with **umoci-unpack**(1)) will **not**
    36  be modified unless the target of **umoci-repack**(1) is the original image tag.
    37  
    38  # OPTIONS
    39  The global options are defined in **umoci**(1).
    40  
    41  **--image**=*image*[:*tag*]
    42    The destination tag for the repacked OCI image. *image* must be a path to a
    43    valid OCI image (and the same *image* used in **umoci-unpack**(1) to create
    44    the *bundle*) and *tag* must be a valid tag name. If another tag already has
    45    the same name as *tag* it will be overwritten. If *tag* is not provided it
    46    defaults to "latest".
    47  
    48  **--no-history**
    49    Causes no history entry to be added for this operation. **This is not
    50    recommended for use with umoci-repack(1), since it results in the history not
    51    including all of the image layers -- and thus will cause confusion with tools
    52    that look at image history.**
    53  
    54  **--history.comment**=*comment*
    55    Comment for the history entry corresponding to this modification of the image
    56    If unspecified, **umoci**(1) will generate an implementation-dependent value.
    57  
    58  **--history.created_by**=*created_by*
    59    CreatedBy entry for the history entry corresponding to this modification of
    60    the image. If unspecified, **umoci**(1) will generate an
    61    implementation-dependent value.
    62  
    63  **--history.author**=*author*
    64    Author value for the history entry corresponding to this modification of the
    65    image. If unspecified, this value will be the image's author value **after**
    66    any modifications were made by this call of **umoci-config**(1).
    67  
    68  **--history-created**=*date*
    69    Creation date for the history entry corresponding to this modifications of
    70    the image. This must be an ISO8601 formatted timestamp (see **date**(1)). If
    71    unspecified, the current time is used.
    72  
    73  **--refresh-bundle**
    74    Whether to update the OCI bundle's metadata (i.e. mtree and umoci
    75    metadata) after repacking the image. If set, then the new state of
    76    the bundle should be equivalent to unpacking the new image tag.
    77  
    78  # EXAMPLE
    79  The following downloads an image from a **docker**(1) registry using
    80  **skopeo**(1), unpacks it with **umoci-unpack**(1), modifies it and then
    81  repacks it.
    82  
    83  ```
    84  % skopeo copy docker://opensuse/amd64:42.2 oci:image:latest
    85  # umoci unpack --image image bundle
    86  # touch bundle/rootfs/a_new_file
    87  # umoci repack --image image:new-42.2 bundle
    88  ```
    89  
    90  # SEE ALSO
    91  **umoci**(1), **umoci-unpack**(1)