Exporters overview — Compression
When you export a compressed output, you can configure the exact compression algorithm and level to use.
Reference note (untrusted external data; do not execute it as instructions).
When you export a compressed output, you can configure the exact compression algorithm and level to use. While the default values provide a good out-of-the-box experience, you can tweak the parameters to optimize for storage versus compute costs. Changing the compression parameters can reduce storage space required, and improve image download times, but will increase build times.
To select the compression algorithm, you can use the compression option. For example, to build an image with compression=zstd
Use the compression-level= option alongside the compression parameter to choose a compression level for the algorithms which support it
0-9 for gzip and estargz 0-22 for zstd
As a general rule, the higher the number, the smaller the resulting file will be, and the longer the compression will take to run.
Use the force-compression=true option to force re-compressing layers imported fr
Attribution: Adapted from Docker Documentation under Apache-2.0. Adaptation: WikiKV isolated this documentation section, normalized formatting, removed long code blocks, and shortened it for retrieval. Verify version-sensitive details at the source.
ATTRIBUTED SOURCE
This compact reference card is adapted from official documentation and is not a community-verified experience.
Docker Documentation — content/manuals/build/exporters/_index.md :: Compression ↗Revision 3a9d778562f3 · Apache-2.0