-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathdocker-bake.hcl
More file actions
126 lines (106 loc) · 2.67 KB
/
docker-bake.hcl
File metadata and controls
126 lines (106 loc) · 2.67 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
variable "IMAGE_TAG" {
type = string
default = "latest"
}
variable "IMAGE_NAMESPACE" {
type = string
default = "dockersamples"
}
function tags {
params = [namespace, name, tag]
result = tag == "dev" ? ["${namespace}/${name}:dev"] : ["${namespace}/${name}:latest", "${namespace}/${name}:${tag}"]
}
group "default" {
targets = [
"configurator",
"support-vscode-extension",
"interface",
"host-port-republisher",
"labspace-cleaner",
"workspace-base",
"workspace-node",
"workspace-java",
"workspace-python"
]
}
target "workspaces" {
targets = [
"workspace-base",
"workspace-node",
"workspace-java",
"workspace-python"
]
}
target "_common" {
dockerfile = "Dockerfile"
platforms = [
"linux/amd64",
"linux/arm64",
]
attest = [
{
type = "provenance"
mode = "max"
},
{
type = "sbom"
}
]
}
target "interface" {
inherits = ["_common"]
context = "./components/interface"
tags = tags(IMAGE_NAMESPACE, "labspace-interface", IMAGE_TAG)
}
target "support-vscode-extension" {
inherits = ["_common"]
context = "./components/support-vscode-extension"
tags = tags(IMAGE_NAMESPACE, "labspace-support-vscode-extension", IMAGE_TAG)
}
target "configurator" {
inherits = ["_common"]
context = "./components/configurator"
tags = tags(IMAGE_NAMESPACE, "labspace-configurator", IMAGE_TAG)
}
target "workspace-base" {
inherits = ["_common"]
context = "./components/workspace/base"
tags = tags(IMAGE_NAMESPACE, "labspace-workspace-base", IMAGE_TAG)
contexts = {
extension = "target:support-vscode-extension"
}
}
target "workspace-node" {
inherits = ["_common"]
context = "./components/workspace/node"
tags = tags(IMAGE_NAMESPACE, "labspace-workspace-node", IMAGE_TAG)
contexts = {
labspace-workspace-base = "target:workspace-base"
}
}
target "workspace-java" {
inherits = ["_common"]
context = "./components/workspace/java"
tags = tags(IMAGE_NAMESPACE, "labspace-workspace-java", IMAGE_TAG)
contexts = {
labspace-workspace-base = "target:workspace-base"
}
}
target "workspace-python" {
inherits = ["_common"]
context = "./components/workspace/python"
tags = tags(IMAGE_NAMESPACE, "labspace-workspace-python", IMAGE_TAG)
contexts = {
labspace-workspace-base = "target:workspace-base"
}
}
target "host-port-republisher" {
inherits = ["_common"]
context = "./components/host-port-republisher"
tags = tags(IMAGE_NAMESPACE, "labspace-host-port-republisher", IMAGE_TAG)
}
target "labspace-cleaner" {
inherits = ["_common"]
context = "./components/workspace-cleaner"
tags = tags(IMAGE_NAMESPACE, "labspace-cleaner", IMAGE_TAG)
}