Skip to content

Latest commit

 

History

History
33 lines (25 loc) · 1.14 KB

resource-limiting.md

File metadata and controls

33 lines (25 loc) · 1.14 KB

Resource limiting

Max parallelism

You can limit the parallelism of the BuildKit solver, which is particularly useful for low-powered machines, using a BuildKit daemon configuration while creating a builder with the --config flags.

[worker.oci]
  max-parallelism = 4

/etc/buildkitd.toml

Now you can create a docker-container builder that will use this BuildKit configuration to limit parallelism.

$ docker buildx create --use \
  --name mybuilder \
  --driver docker-container \
  --config /etc/buildkitd.toml

Limit on TCP connections

We are also now limiting TCP connections to 4 per registry with an additional connection not used for layer pulls and pushes. This limitation will be able to manage TCP connection per host to avoid your build being stuck while pulling images. The additional connection is used for metadata requests (image config retrieval) to enhance the overall build time.

More info: moby/buildkit#2259