docker / buildx

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

Feature request: Allow storing builder configurations in a file #2799

Open lumattr opened 2 days ago

lumattr commented 2 days ago

Description

I would like to use the multiplatform building in my CI but ideally i would like to predefine a config file for consistency rather that having to run docker buildx create and appending for platform types. It would be good if i could do something like docker buildx create --from builders.yaml and then jump straight into building.

i.e.

# builders.yaml
kube:
  arm64:
    driver: kubernetes
    driver-opt: 
      namepace: buildkit
      nodeselector: "kubernetes.io/arch=arm64"
    platform:
      - linux/arm64
  amd64:
    driver: kubernetes
    driver-opt: 
      namepace: buildkit
      nodeselector: "kubernetes.io/arch=amd64"
    platform:
      - linux/amd64