Where is buildkitd.toml when running on WSL2?
Where does one put buildkitd.toml when trying to reduce max-parallelism on WSL2 backed Docker on Windows? I tried all more or less obvious locations I could think of:
- /etc/buildkit/buildkitd.toml inside of my own WSL2 Distro
- /etc/buildkit/buildkitd.toml inside of the docker-desktop WSL distro
- C:\ProgramData\buildkitd\buildkitd.toml on the Host
There is also a suspicious /tmp/docker-desktop-root inside of the docker-desktop WSL distro. It has a bunch of other docker config files in its own /etc. But unfortunately it appears to be mounted from some iso image, and is fully read-only.
Now, where do I actually put the file for it to take effect?
If you are using buildx you can use docker buildx create --config ./any/path to create buildkit instance in container with a specified config.
Otherwise, path needs to be /etc/buildkit/buildkitd.toml in the environment where buildkitd is running.
I explicitly don't want to create a new builder. I'd like to modify the settings of the default one. I have tried /etc/buildkit/buildkitd.toml in all WSL2 environments/distros, but none of them had any effect. Like I said, I also tried the Windows-Path, but it didn't work either.
Are you asking for the buildkit that is embedded in dockerd (buildx docker driver)? I don't think there is currently a max-parallelism option in dockerd configuration. Would need to be added in https://github.com/moby/moby/blob/master/daemon/config/builder.go#L71
Yes. That would certainly explain things. I'll see how easy it is to add and send a PR if I figure it out.