buildkit icon indicating copy to clipboard operation
buildkit copied to clipboard

Where is the buildKit default cache directory?

Open gitfxx opened this issue 4 years ago • 3 comments

I use BuildKit in K8s pod to build image, Now this is how I use it: image But when multiple pods run buildkit at the same time, the other tasks will fail because the same buildKitdlock is used; image which is the default cache directory for buildKit? image

gitfxx avatar Aug 25 '21 12:08 gitfxx

you can only have one active buildkitd daemon per state/storage directory

tonistiigi avatar Aug 25 '21 19:08 tonistiigi

@tonistiigi I just want to use cache to speed up building the image, which directory should I mount when running in pod?

I used export-cache(type=local),but it didn't seem to speed up the build

gitfxx avatar Aug 25 '21 23:08 gitfxx

You have to create separate dirs per pod. Or just mount emptyDir vol.

AkihiroSuda avatar Aug 26 '21 02:08 AkihiroSuda