-
Notifications
You must be signed in to change notification settings - Fork 71
/
docker-bake.hcl
100 lines (87 loc) · 1.77 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
variable "REPO" {
default = "tonistiigi/binfmt"
}
variable "QEMU_REPO" {
default = "https://github.com/qemu/qemu"
}
variable "QEMU_VERSION" {
default = "v8.1.5"
}
variable "QEMU_PATCHES" {
default = "cpu-max-arm"
}
// Special target: https://github.com/docker/metadata-action#bake-definition
target "meta-helper" {
tags = ["${REPO}:test"]
}
group "default" {
targets = ["binaries"]
}
target "binaries" {
output = ["./bin"]
platforms = ["local"]
target = "binaries"
}
target "all-arch" {
platforms = [
"linux/amd64",
"linux/arm64",
"linux/arm/v6",
"linux/arm/v7",
"linux/ppc64le",
"linux/s390x",
"linux/riscv64",
"linux/386",
]
}
target "mainline" {
inherits = ["meta-helper"]
args = {
QEMU_REPO = QEMU_REPO
QEMU_VERSION = QEMU_VERSION
QEMU_PATCHES = QEMU_PATCHES
QEMU_PRESERVE_ARGV0 = "1"
}
cache-to = ["type=inline"]
cache-from = ["${REPO}:master"]
}
target "mainline-all" {
inherits = ["mainline", "all-arch"]
}
target "buildkit" {
inherits = ["mainline"]
args = {
BINARY_PREFIX = "buildkit-"
QEMU_PATCHES = "${QEMU_PATCHES},buildkit-direct-execve-v8.1"
QEMU_PRESERVE_ARGV0 = ""
}
cache-from = ["${REPO}:buildkit-master"]
target = "binaries"
}
target "buildkit-all" {
inherits = ["buildkit", "all-arch"]
}
target "buildkit-test" {
inherits = ["buildkit"]
target = "buildkit-test"
cache-to = []
tags = []
}
target "desktop" {
inherits = ["mainline"]
args = {
QEMU_PATCHES = "${QEMU_PATCHES},subreaper-prctl,pretcode"
}
cache-from = ["${REPO}:desktop-master"]
}
target "desktop-all" {
inherits = ["desktop", "all-arch"]
}
target "archive" {
inherits = ["mainline"]
target = "archive"
output = ["./bin"]
}
target "archive-all" {
inherits = ["archive", "all-arch"]
}