Tmpfs mode/permission settings not working for docker executor


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 user:user.

I tried using the mode option from regular mount(8) options, but that doesn’t work.

concurrent = 1
check_interval = 10

  session_timeout = 1800

  name = "..."
  url = ""
  token = "..."
  executor = "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"]
      "/home/user/.local/share/buildkit/runc-overlayfs" = "rw,mode=1777"