buildkit
buildkit copied to clipboard
Running out of RAM — change max-parallelism from the command line?
In the buildkit.toml
file I can set a limit on parallelism with:
[worker.oci]
max-parallelism = 4
I do not see a way to set this on the command line from buildkitd
, is that accurate?
Consequently with buildx
you would have to use docker buildx create --config foo.toml
which would override all buildkitd
settings, not just the one.
Why is this a problem?
Too much build parallelism can cause issues if you use tmpfs
mounts during a build, because you can run out of space in the tmpfs if the build is consuming too much RAM from concurrent build steps.
which would override all buildkitd settings, not just the one.
It will only override the max-parallelism
in default config as that is the only one you have defined.
https://github.com/moby/buildkit/issues/2108 Issue tracking updates to the underlying problem.
It will be awesome if you can add support to pass --oci-worker-max-parallelism
from the cli in order to override max-parallelism
, I couldn't find this flag here (link)
I know that you can override max-parallelism
with the buildkit.toml
, but in my use case it's a bit complicated for me to manage a buildkit.toml
file.
Today supported flags (version v0.12.3):