buildah icon indicating copy to clipboard operation
buildah copied to clipboard

--cache-to pushes base image as part of cache bundle

Open aaronlehmann opened this issue 1 year ago • 3 comments

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:

  1. Build an image using --cache-to

Describe the results you received:

  1. Cache image pushed to registry is large and includes base image referenced by FROM line

Describe the results you expected:

  1. 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

aaronlehmann avatar Apr 01 '24 16:04 aaronlehmann

@flouthoc WDYT?

rhatdan avatar Apr 05 '24 12:04 rhatdan

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

github-actions[bot] avatar May 06 '24 00:05 github-actions[bot]

Related or duplicate of #4381 ?

cmorty avatar Jun 24 '25 08:06 cmorty