Skip to content

Instantly share code, notes, and snippets.

@cpuguy83
Created May 7, 2019 23:35
Show Gist options
  • Save cpuguy83/32532552620f4dde7a03739c9a37b020 to your computer and use it in GitHub Desktop.
Save cpuguy83/32532552620f4dde7a03739c9a37b020 to your computer and use it in GitHub Desktop.

dockerbuild.hcl is an example manifest for buildx

Build all the "latest" images:

docker buildx bake -f dockerbuild.hcl latest

Build a specific target:

docker buildx bake -f dockerbuild.hcl mic:1.3

Build multiple targets (without using a "group"):

docker buildx bake -f dockerbuild.hcl mic:1.3 nmi:1.4
group "latest" {
targets = ["mic:1.3", "nmi:1.4", "identityvalidator:1.0", "demo:1.2"]
}
target "base" {
context = "git://github.com/Azure/aad-pod-identity.git#dfd8365d59922e6f024aa215ec04db6328624e7b"
}
target "mic:1.3" {
target = "mic"
inherits = ["base"]
args = {
MIC_VERSION = "1.3.0"
}
tags = ["cpuguy83/aad-pod-identity-mic:1.3"]
}
target "nmi:1.4" {
target = "nmi"
inherits = ["base"]
args = {
NMI_VERSION = "1.4.0"
}
tags = ["cpuguy83/aad-pod-identity-nmi:1.4"]
}
target "identityvalidator:1.0" {
target = "identityvalidator"
inherits = ["base"]
args = {
IDENTITY_VALIDATOR_VERSION = "1.0.0"
}
tags = ["cpuguy83/aad-pod-identity-identityvalidator:1.0"]
}
target "demo:1.2" {
target = "demo"
inherits = ["base"]
args = {
DEMO_VERSION = "1.2.0"
}
tags = ["cpuguy83/aad-pod-identity-demo:1.2"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment