-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-bake.hcl
More file actions
40 lines (36 loc) · 874 Bytes
/
docker-bake.hcl
File metadata and controls
40 lines (36 loc) · 874 Bytes
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
/////////////////////////
// control-plane image //
/////////////////////////
variable "CONTROL_PLANE_IMAGE_REPO" {
default = "host.docker.internal:5000/control-plane"
}
variable "CONTROL_PLANE_VERSION" {}
function "control_plane_tags" {
params = [repo, version]
// Exclude the 'latest' tag if this is a prerelease
result = length(regexall("v\\d+\\.\\d+\\.\\d+$", version)) > 0 ? [
"${repo}:${version}",
"${repo}:latest",
] : [
"${repo}:${version}"
]
}
target "control_plane" {
context = "dist"
dockerfile = "../docker/control-plane/Dockerfile"
args = {
ARCHIVE_VERSION = trimprefix(CONTROL_PLANE_VERSION, "v")
}
tags = control_plane_tags(
CONTROL_PLANE_IMAGE_REPO,
CONTROL_PLANE_VERSION,
)
platforms = [
"linux/amd64",
"linux/arm64",
]
attest = [
"type=provenance,mode=min",
"type=sbom",
]
}