--cache-to pushes base image as part of cache bundle
Description
When using --cache-to to push cache to a registry, buildah appears to include the base image referenced in the FROM line in the cache bundle it pushes to the registry. When dealing with very large base images, this can make the cache push very slow. It doesn't seem useful to push a base image to cache because this isn't something that was actually produced by the build. Would it be possible to omit this from the cache images pushed to the repository specified in --cache-to?
Steps to reproduce the issue:
- Build an image using
--cache-to
Describe the results you received:
- Cache image pushed to registry is large and includes base image referenced by
FROMline
Describe the results you expected:
- Only newly built layers are pushed to cache.
Output of buildah version:
Version: 1.36.0-dev
Go Version: go1.22.1
Image Spec: 1.1.0
Runtime Spec: 1.1.0
CNI Spec: 1.0.0
libcni Version: v1.1.2
image Version: 5.30.0
Git Commit: 39ea15cedd36acc0b5c0a35c597be9e850832e16-dirty
Built: Sun Mar 31 00:49:16 2024
OS/Arch: linux/amd64
BuildPlatform: linux/amd64
@flouthoc WDYT?
A friendly reminder that this issue had no activity for 30 days.
Related or duplicate of #4381 ?