-
Notifications
You must be signed in to change notification settings - Fork 471
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge targets from multiple JSON files #756
Comments
tonistiigi
changed the title
Merge targets from multiple files
Merge targets from multiple JSON files
Sep 2, 2021
Updated title as this should work for hcl/compose already. At least there is tested https://github.com/docker/buildx/blob/master/bake/hcl_test.go#L257 |
@tonistiigi Yes I can confirm: $ cat <<'EOF' > docker-bake.hcl
target "default" {
context = "."
}
EOF
$ cat <<'EOF' > docker-bake.override.json
target "default" {
tags = ["test123"]
}
EOF
$ docker buildx bake -f docker-bake.hcl -f docker-bake.override.hcl --print
{
"group": {
"default": [
"default"
]
},
"target": {
"default": {
"context": ".",
"dockerfile": "Dockerfile",
"tags": [
"test123"
]
}
}
} |
@crazy-max This doesn't work with more than two files: docker buildx bake -f bake1.json -f bake2.json -f ./docker-bake.hcl --print
[+] Building 0.0s (0/0)
bake2.json:2
--------------------
1 | {
2 | >>> "target": {
3 | "worker": {
4 | "tags": ["username/app:pr-80"],
--------------------
error: bake2.json:2,3-11: Duplicate argument; Argument "target" was already set at bake1.json:2,3-11, and 1 other diagnostic(s) |
StefanSchoof
added a commit
to StefanSchoof/espresso
that referenced
this issue
Jan 13, 2022
StefanSchoof
added a commit
to StefanSchoof/espresso
that referenced
this issue
Jan 13, 2022
This was referenced Mar 23, 2022
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The goal:
But instead, it fails with:
The text was updated successfully, but these errors were encountered: