buildx icon indicating copy to clipboard operation
buildx copied to clipboard

enable formatting option while listing builder instances

Open developer-guy opened this issue 3 years ago • 2 comments

By default, when the user supplies the docker buildx ls command, the output will look like the following:

NAME/NODE       DRIVER/ENDPOINT STATUS  PLATFORMS
desktop-linux   docker                  
  desktop-linux desktop-linux   running linux/amd64, linux/arm64, linux/riscv64, linux/ppc64le, linux/s390x, linux/386, linux/arm/v7, linux/arm/v6
default *       docker                  
  default       default         running linux/amd64, linux/arm64, linux/riscv64, linux/ppc64le, linux/s390x, linux/386, linux/arm/v7, linux/arm/v6

So to make this more modular, we can provide an additional option called --format as the imagetools command has. Also, we can get the detail of one of the builders via the `--name option.

$ docker buildx ls --name default --format={{.Platforms}}
linux/amd64, linux/arm64, linux/riscv64, linux/ppc64le, linux/s390x, linux/386, linux/arm/v7, linux/arm/v6

developer-guy avatar Mar 24 '22 13:03 developer-guy

Yes will revisit https://github.com/docker/buildx/pull/830

crazy-max avatar Mar 26 '22 11:03 crazy-max

docker buildx ls --name default --format={{.Platforms}}

This should be format on inspect, not ls

tonistiigi avatar Mar 28 '22 03:03 tonistiigi