LinuxCommandLibrary

crane-flatten

squash container layers into one

TLDR

Flatten image layers
$ crane flatten [image] -t [flattened:tag]
copy

SYNOPSIS

crane flatten [options] image

DESCRIPTION

crane flatten squashes all layers of a container image into a single layer. This can reduce image size and improve pull times by eliminating layer overhead.

PARAMETERS

-t, --tag tag

Tag for the flattened image.

CAVEATS

Flattening removes layer history and may affect caching. The resulting image cannot benefit from shared base layers.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard