-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathdocker-bake.hcl
More file actions
70 lines (56 loc) · 1.54 KB
/
docker-bake.hcl
File metadata and controls
70 lines (56 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// This is set automatically when running in Github Actions
variable "CI" { default = "false" }
// Git version information
variable "GIT_COMMIT_HASH" { default = "unknown" }
variable "GIT_VERSION" { default = "unknown" }
variable "GIT_SHORT_HASH" { default = "unknown" }
variable "IMAGES" {
default = [
{ name = "execution" },
{ name = "consensus" },
]
}
group "default" {
targets = [for image in IMAGES : "arc-${image.name}"]
}
target "docker-metadata-action" {}
target "meta-target" {
matrix = { item = IMAGES }
name = "${item.name}-meta-target"
platforms = CI ? ["linux/amd64", "linux/arm64"] : []
output = CI ? [] : ["type=docker"]
tags = [
# Will be overridden in CI
"arc/${item.name}:latest",
]
context = "."
dockerfile = "deployments/Dockerfile.${item.name}"
target = "release-runtime"
contexts = {
certs = "./deployments/certs"
}
args = {
GIT_COMMIT_HASH = GIT_COMMIT_HASH
GIT_VERSION = GIT_VERSION
GIT_SHORT_HASH = GIT_SHORT_HASH
}
}
target "target" {
matrix = { item = IMAGES }
name = "arc-${item.name}"
inherits = ["${item.name}-meta-target", "docker-metadata-action"]
}
target "dev-meta-target" {
matrix = { item = IMAGES }
name = "${item.name}-dev-meta-target"
inherits = ["${item.name}-meta-target"]
target = "dev-runtime"
tags = [
"arc/${item.name}-dev:latest",
]
}
target "dev-target" {
matrix = { item = IMAGES }
name = "arc-${item.name}-dev"
inherits = ["${item.name}-dev-meta-target", "docker-metadata-action"]
}