What is `zstd` compression for images and how do you enable it?
IntermediateProductionBuild Performance & CI
Answer
zstd decompresses much faster than gzip at similar ratios, speeding up pulls. Build with --output type=image,name=reg/app:1,push=true,compression=zstd,force-compression=true. Registries and runtimes (containerd 1.5+, recent Docker) support it; very old nodes or registries may not.
More on Build Performance & CI
How do you make Docker builds fast in CI where runners are ephemeral?BeginnerWhat are the cache backends in buildx?BeginnerWhy does `inline` cache often disappoint?AdvancedHow do you structure a Python Dockerfile for the best caching and size?IntermediateHow do you structure a Node.js production image?IntermediateHow do you build a small Java image?Beginner