buildah icon indicating copy to clipboard operation
buildah copied to clipboard

cache compression algorithm

Open nicolaerosiaradcom opened this issue 9 months ago • 3 comments

Is there a way to specify how to compress the cached layers when doing buildah build, of course with --layers ?

It seems like the cache has MIMEType application/vnd.oci.image.layer.v1.tar+gzip

nicolaerosiaradcom avatar Mar 19 '25 11:03 nicolaerosiaradcom

Can i understand what are you trying to do ? --layers are intermediate images which are stored on local host.

flouthoc avatar Mar 19 '25 14:03 flouthoc

@flouthoc

I'm building the images in a CI and I would like to speed up things by using zstd cache. Cache gets created and reused just fine, however it seems to be compressed using gzip, even if I have something like this which causes the final images to be pushed (buildah push) with the right compression format.

tee "/etc/containers/containers.conf.d/myconf.conf" << EOF
[engine]
compression_format="zstd:chunked"
compression_level=3
EOF
buildah build \
  --timestamp=1742216986 \
  --cache-from ${NEXUS_REGISTRY}/cache \
  --cache-to ${NEXUS_REGISTRY}/cache \
  --cache-ttl=240h \
  --layers=true \
  --disable-compression=true \
[...]

nicolaerosiaradcom avatar Mar 28 '25 23:03 nicolaerosiaradcom

A friendly reminder that this issue had no activity for 30 days.

github-actions[bot] avatar Apr 28 '25 00:04 github-actions[bot]