istio.io/istio@v0.0.0-20240520182934-d79c90f27776/samples/builder/docker-bake.hcl (about) 1 variable "HUB" { 2 default = "localhost:5000" 3 } 4 5 variable "PLATFORMS" { 6 default = "linux/amd64,linux/arm64" 7 } 8 9 images = [ 10 { 11 name = "tcp-echo-server" 12 source = "../tcp-echo/src" 13 tags = ["1.3", "latest"] 14 }, 15 16 { 17 name = "examples-helloworld-v1" 18 source = "../helloworld/src" 19 args = { 20 service_version = "v1" 21 } 22 tags = ["1.0", "latest"] 23 }, 24 { 25 name = "examples-helloworld-v2" 26 source = "../helloworld/src" 27 args = { 28 service_version = "v2" 29 } 30 tags = ["1.0", "latest"] 31 }, 32 ] 33 34 target "default" { 35 matrix = { 36 item = images 37 } 38 name = item.name 39 context = "${item.source}" 40 tags = [ 41 for x in setproduct([HUB], item.tags) : join("/${item.name}:", x) 42 ] 43 args = lookup(item, "args", {}) 44 platforms = split(",", lookup(item, "platforms", PLATFORMS)) 45 }