-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-bake.hcl
69 lines (56 loc) · 1.37 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
variable "VERSION" {
default = "0.0.0"
}
variable "LATEST" {
default = false
}
variable "BASE_REPO" {
default = "ghcr.io/marfien/mc-on-k8s"
}
group "default" {
targets = ["proxy", "gameserver"]
}
group "proxy" {
targets = ["proxy-velocity", "proxy-bungeecord"]
}
group "gameserver" {
targets = ["gameserver-bukkit", "gameserver-sponge", "gameserver-minestom"]
}
target "proxy-velocity" {
context = "./proxy-impl-velocity/"
tags = makeTags("proxy", "velocity")
}
target "proxy-bungeecord" {
context = "./proxy-impl-bungeecord/"
tags = makeTags("proxy", "bungeecord")
}
target "gameserver-bukkit" {
context = "./server-impl-bukkit/"
tags = makeTags("server", "bukkit")
}
target "gameserver-minestom" {
context = "./server-impl-minestom/"
tags = makeTags("server", "minestom")
}
target "gameserver-sponge-vanilla" {
context = "./server-impl-sponge/"
dockerfile = "vanilla.Dockerfile"
tags = makeTags("server", "sponge-vanilla")
}
target "gameserver-sponge-forge" {
context = "./server-impl-sponge/"
dockerfile = "forge.Dockerfile"
tags = makeTags("server", "sponge-forge")
}
function "makeTags" {
params = [type, name]
result = [
makeTag(type, "${name}-${VERSION}"),
LATEST ? makeTag(type, name) : "",
LATEST ? makeTag(type, "${name}-latest") : ""
]
}
function "makeTag" {
params = [name, tag]
result = "${BASE_REPO}/${name}:${tag}"
}