-
-
Notifications
You must be signed in to change notification settings - Fork 126
/
Copy pathdocker-bake.hcl
62 lines (52 loc) · 1.01 KB
/
docker-bake.hcl
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
variable "RUST_VERSION" {
default = "1"
}
variable "XX_VERSION" {
default = "master"
}
variable "RELEASE_TAG" {
default = null
}
variable "REPO" {
default = "tamasfe/taplo"
}
variable "PUSH" {
default = false
}
variable "platforms" {
default = [
"linux/i386",
"linux/amd64",
"linux/arm64",
"linux/riscv64",
"linux/arm/v7",
]
}
target "_platforms" {
platforms = platforms
}
group "default" {
targets = ["binary", "oci"]
}
target "binary" {
inherits = ["alpine"]
output = ["type=local,dest=target/alpine"]
target = "binary"
}
target "oci" {
inherits = ["alpine"]
output = ["type=image,push=${PUSH}"]
target = "oci"
tags = flatten(["${REPO}:latest", RELEASE_TAG != null ? ["${REPO}:${RELEASE_TAG}"] : []])
}
target "alpine" {
context = "."
platforms = platforms
pull = true
dockerfile = "docker/alpine/Dockerfile"
args = {
RUST_VERSION = RUST_VERSION
XX_VERSION = XX_VERSION
DISTRIBUTION_VERSION = "3.21"
}
}