LinuxCommandLibrary

crane-append

Append layers to an existing container image

TLDR

Push image based on a base image

$ crane append [[-b|--base]] [image_name]
copy

Push image with appended layer from tarball
$ crane append [[-f|--new_layer]] [layer_name1 layer_name2 ...]
copy

Push image with appended layer with new tag
$ crane append [[-t|--new_tag]] [tag_name]
copy

Push resulting image to new tarball
$ crane append [[-o|--output]] [path/to/tarball]
copy

Use empty base image of type OCI media instead of Docker
$ crane append --oci-empty-base
copy

Annotate resulting image as being based on the base image
$ crane append --set-base-image-annotations
copy

Display help
$ crane append [[-h|--help]]
copy

SYNOPSIS

crane append source_image target_image

PARAMETERS

source_image
    The container image from which layers will be appended.

target_image
    The container image that will receive the appended layers.

DESCRIPTION

The `crane append` command allows you to add layers from existing container images to another image. It effectively "appends" layers from a source image to the target image's manifest, creating a new image with the combined layers. This is useful for building custom images, rebasing images, or layering on additional functionality. This process requires using the 'crane' tool, a container image management tool. The user specifies the source image and the target image or image list to append to. The 'append' operation creates a new image reference in the remote registry. To use this command, the user has to have write permissions to the registry target image.

EXAMPLE

To append all layers from `ubuntu:latest` to `myrepo/myimage:latest`, you would run: crane append ubuntu:latest myrepo/myimage:latest

SEE ALSO

crane push(1), crane pull(1), crane manifest(1)

Copied to clipboard