Hello, I'm trying to setup custom gc policies for buildkit.
Mainly because we run a ton of different builds, and rarely we are going to reuse the build results. As the layer will be invalidated on the next commit (files changed hence everything after that is invalid).
The problem is that caching 50 builds per commit, baloons the storage.
The cache is useful for npm modules and pre-commit environment etc. But beyond that, the rest are 1time use.
Anyway. Enough rambiling.
My understanding is that dagger uses buildkit internally. Now the config file for buildkit must exist inside the dagger container.
The dagger container is spun up (if not already) when I do
client, err := dagger.Connect(ctx, dagger.WithLogOutput(out))
How do I mount the config file in the dagger container?
Do I have to start it manually before connecting? If yes, what flags/envs do I need to pass? Is there somewhere the default docker run command used?
Any pointers will be valuable 😄
I'm kinda stuck all day pruning cache now, because the runners we have, are equipped with 250gb ssds and those are getting full way too fast.