Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prune: filtering out ADD --checksum=... https://... entries #2448

Open
fenollp opened this issue May 7, 2024 · 3 comments
Open

prune: filtering out ADD --checksum=... https://... entries #2448

fenollp opened this issue May 7, 2024 · 3 comments
Labels
area/buildkit kind/enhancement New feature or request

Comments

@fenollp
Copy link

fenollp commented May 7, 2024

Description

I'd like to be able to run docker buildx prune but keep in cache the pinned ADD downloads.
Could we extend on the --filter=.. syntax?

Side curiosity: why are these cache entries marked Mutable: true?
From my understanding of du's docs that'd mean that its size can grow.

Is there a missed optimization opportunity of in the ADD op here, setting mutable=false?
cc moby/buildkit#975 (comment)

@fenollp fenollp added kind/enhancement New feature or request status/triage labels May 7, 2024
@tonistiigi
Copy link
Member

We could change the type for these to source.http like source.git.checkout and source.local instead of regular.

Mutable is because there was no need to make it immutable (there are no layers on top of it or images created directly from this data). It doesn't change anything for the cache reuse. Actual changing of the data is theoretical, currently there isn't any option that would for example add new files to same snapshot, or continue download or reuse previous snapshot of downloaded file and for example rename the file.

@fenollp
Copy link
Author

fenollp commented May 9, 2024

We could change the type for these to source.http like source.git.checkout and source.local instead of regular.

Are you implying there's a type filter today? Where is it documented?
If that's the case it sounds great to me :)

@tonistiigi
Copy link
Member

Yes, you can use docker buildx prune --filter 'type=source.local' for example but looks like the records created from ADD url are type=regular atm and don't have a specific type definition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/buildkit kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants