docker / buildx

Docker CLI plugin for extended build capabilities with BuildKit
Apache License 2.0
3.52k stars 473 forks source link

how should I know which node is selected ? #429

Open chengjingtao opened 3 years ago

chengjingtao commented 3 years ago

Hi, I have multi nodes in one builder instance. But how should I know which node is selected when I use buildx build to build multi-platform images? and what is the schedule strategy ?

tonistiigi commented 3 years ago

It is the first node that supports the target platform. Nodes that define platforms manually on buildx create are preferred (signified by * in output).

chengjingtao commented 3 years ago

does it means there is no balancing during scheduling ?

eg. buildx build --platform linux/arm64 on this builder:

NAME/NODE   DRIVER/ENDPOINT             STATUS  PLATFORMS
arm *      docker-container
  arm0     unix:///var/run/docker.sock running linux/amd64, linux/arm64, linux/386, linux/arm/v7, linux/arm/v6, linux/amd64, linux/arm64, linux/riscv64, linux/ppc64le, linux/386, linux/arm/v7, linux/arm/v6, linux/s390x
  arm1     arm-1                   running linux/arm64
  arm2     arm-2                   running linux/arm64
  arm3     arm-3                   running linux/arm64

it always selects the first node named arm0 ?

tonistiigi commented 3 years ago

it always selects the first node named arm0 ?

Yes. It is different for k8s driver, then there is a consistent hash computed per project and you can't pick the subnode.