-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-bake.hcl
57 lines (51 loc) · 1.11 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
variable "REPO" {
default = "hominsu"
}
variable "AUTHOR_NAME" {
default = "Homing So"
}
variable "AUTHOR_EMAIL" {
default = "homingso@foxmail.com"
}
variable "VERSION" {
default = ""
}
group "default" {
targets = [
"moses-devel",
"moses-runtime",
]
}
target "moses-devel" {
context = "."
dockerfile = "devel/Dockerfile"
args = {
AUTHOR_NAME = "${AUTHOR_NAME}"
AUTHOR_EMAIL = "${AUTHOR_EMAIL}"
REPO = "${REPO}"
VERSION = "$(VERSION)"
}
tags = [
notequal("", VERSION) ? "${REPO}/moses:devel-${VERSION}" : "",
"${REPO}/moses:devel",
]
platforms = ["linux/amd64", "linux/arm64"]
}
target "moses-runtime" {
contexts = {
"${REPO}/moses:devel" = "target:moses-devel"
}
dockerfile = "runtime/Dockerfile"
args = {
AUTHOR_NAME = "${AUTHOR_NAME}"
AUTHOR_EMAIL = "${AUTHOR_EMAIL}"
REPO = "${REPO}"
VERSION = "$(VERSION)"
}
tags = [
notequal("", VERSION) ? "${REPO}/moses:runtime-${VERSION}" : "",
"${REPO}/moses:runtime",
"${REPO}/moses:latest",
]
platforms = ["linux/amd64", "linux/arm64"]
}