I am using rootless buildkit to build my project in Gitlab CI. I am using self-hosted runners with the docker executor to launch
buildkit:rootless image in which the build is done. I have now optimized my caching to a point that on most commits my project can be built in around 5-10 sec. But now image extraction is dominating my CI time, so I want to mount a tmpfs volume to help speed up the image extraction.
The problem is that the permissions are wrong. When I mount tmpfs to
/home/user/.local/share/buildkit/runc-overlayfs, which is where the images are extracted, it has
root:root ownership and is not writable by
"user". This makes my build fail. How can I mount the tmpfs volume to that directory with let’s say
1777 permissions? Or have it owned by
I tried using the
mode option from regular
mount(8) options, but that doesn’t work.
concurrent = 1 check_interval = 10 [session_server] session_timeout = 1800 [[runners]] name = "..." url = "https://gitlab.com" token = "..." executor = "docker" [runners.custom_build_dir] [runners.cache] [runners.cache.s3] [runners.cache.gcs] [runners.cache.azure] [runners.docker] tls_verify = false image = "alpine:latest" privileged = false disable_entrypoint_overwrite = false oom_kill_disable = false disable_cache = false volumes = ["/cache"] shm_size = 0 security_opt = ["seccomp:unconfined", "apparmor:unconfined"] [runners.docker.tmpfs] "/home/user/.local/share/buildkit/runc-overlayfs" = "rw,mode=1777"