-
-
Notifications
You must be signed in to change notification settings - Fork 115
/
docker-bake.hcl
78 lines (66 loc) · 1.28 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
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 "APK_FAMILY_PACKAGES" {
default = [
"make",
"clang",
"git",
"lld",
"build-base",
"openssl-dev",
"openssl-libs-static",
]
}
variable "platforms" {
default = [
"linux/i386",
"linux/amd64",
"linux/arm64",
// "linux/riscv64",
// "linux/s390x",
"linux/arm/v7",
// "linux/arm/v6",
]
}
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.20"
DISTRIBUTION_PACKAGES = join(" ", APK_FAMILY_PACKAGES)
}
}