buildx
buildx copied to clipboard
enable formatting option while listing builder instances
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
Yes will revisit https://github.com/docker/buildx/pull/830
docker buildx ls --name default --format={{.Platforms}}
This should be format on inspect, not ls