-
Notifications
You must be signed in to change notification settings - Fork 585
Open
Description
Contributing guidelines
- I've read the contributing guidelines and wholeheartedly agree
I've found a bug and checked that ...
- ... the documentation does not mention anything about my problem
- ... there are no open or closed issues that are related to my problem
Description
BuildKit in Kubernetes rootless mode does not use RAM disk for builds when requested.
This code should honor the buildkit-root-volume-memory option and create a volume with "Medium" set to "Memory":
buildx/driver/kubernetes/manifest/manifest.go
Lines 302 to 305 in e540b7a
d.Spec.Template.Spec.Containers[0].VolumeMounts = append(d.Spec.Template.Spec.Containers[0].VolumeMounts, corev1.VolumeMount{ | |
Name: emptyDirVolName, | |
MountPath: "/home/user/.local/share/buildkit", | |
}) |
Expected behaviour
When buildkit-root-volume-memory is configured, builds should occur on RAM disk, even in rootless mode.
Actual behaviour
When running BuildKit in rootless mode, /var/lib/buildkit is not used. Instead, data is stored in the non-root user's home directory. This causes image builds to hit the file system instead of memory, even when buildkit-root-volume-memory
is set.
Buildx version
github.com/docker/buildx v0.27.0 bac71de
Docker info
Builders list
kubernetes
Configuration
Build logs
Additional info
No response