it appears that inherits cannot be nested, or, (for me: worse), it only affects the first target.
For example docker buildx bake --print --file FILE on:
target "grandparent" {
output = ["type=docker"]
}
target "parent" {
inherits = ["grandparent"]
args = {
FOO = "bar"
}
}
target "child 1" {
inherits = ["parent"]
}
target "child 2" {
inherits = ["parent"]
}
group "default" {
targets = [
"child 1",
"child 2"
]
}
{
"group": {
"default": {
"targets": [
"child 1",
"child 2"
]
}
},
"target": {
"child 1": {
"context": ".",
"dockerfile": "Dockerfile",
"args": {
"FOO": "bar"
},
"output": [
"type=docker"
]
},
"child 2": {
"context": ".",
"dockerfile": "Dockerfile",
"args": {
"FOO": "bar"
}
}
}
}
My expectation would have been that either:
- both child 1 and 2 inherit
output
- neither inherit
output and the parser tells me that I can't nest inherits
Took me a while to figure this out 🙃
(Amazing work on bake -- love it ❤️)
it appears that
inheritscannot be nested, or, (for me: worse), it only affects the first target.For example
docker buildx bake --print --file FILEon:My expectation would have been that either:
outputoutputand the parser tells me that I can't nestinheritsTook me a while to figure this out 🙃
(Amazing work on bake -- love it ❤️)