-
Notifications
You must be signed in to change notification settings - Fork 141
/
docker-bake.hcl
147 lines (130 loc) · 4.43 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
group "default" {
targets = ["debian-latest", "alpine-latest", "debian-16", "debian-15", "debian-14", "debian-13", "debian-12", "alpine-16", "alpine-15", "alpine-14", "alpine-13", "alpine-12"]
}
variable "REGISTRY_PREFIX" {
default = ""
}
variable "IMAGE_NAME" {
default = "postgres-backup-local"
}
variable "BUILD_REVISION" {
default = ""
}
target "debian" {
args = {"GOCRONVER" = "v0.0.11"}
dockerfile = "debian.Dockerfile"
}
target "alpine" {
args = {"GOCRONVER" = "v0.0.11"}
dockerfile = "alpine.Dockerfile"
}
target "debian-latest" {
inherits = ["debian"]
platforms = ["linux/amd64", "linux/arm64", "linux/arm/v7", "linux/s390x", "linux/ppc64le"]
args = {"BASETAG" = "17"}
tags = [
"${REGISTRY_PREFIX}${IMAGE_NAME}:latest",
"${REGISTRY_PREFIX}${IMAGE_NAME}:17",
notequal("", BUILD_REVISION) ? "${REGISTRY_PREFIX}${IMAGE_NAME}:17-debian-${BUILD_REVISION}" : ""
]
}
target "alpine-latest" {
inherits = ["alpine"]
platforms = ["linux/amd64", "linux/arm64", "linux/arm/v7", "linux/s390x", "linux/ppc64le"]
args = {"BASETAG" = "17-alpine"}
tags = [
"${REGISTRY_PREFIX}${IMAGE_NAME}:alpine",
"${REGISTRY_PREFIX}${IMAGE_NAME}:17-alpine",
notequal("", BUILD_REVISION) ? "${REGISTRY_PREFIX}${IMAGE_NAME}:17-alpine-${BUILD_REVISION}" : ""
]
}
target "debian-16" {
inherits = ["debian"]
platforms = ["linux/amd64", "linux/arm64", "linux/arm/v7", "linux/s390x", "linux/ppc64le"]
args = {"BASETAG" = "16"}
tags = [
"${REGISTRY_PREFIX}${IMAGE_NAME}:16",
notequal("", BUILD_REVISION) ? "${REGISTRY_PREFIX}${IMAGE_NAME}:16-debian-${BUILD_REVISION}" : ""
]
}
target "alpine-16" {
inherits = ["alpine"]
platforms = ["linux/amd64", "linux/arm64", "linux/arm/v7", "linux/s390x", "linux/ppc64le"]
args = {"BASETAG" = "16-alpine"}
tags = [
"${REGISTRY_PREFIX}${IMAGE_NAME}:16-alpine",
notequal("", BUILD_REVISION) ? "${REGISTRY_PREFIX}${IMAGE_NAME}:16-alpine-${BUILD_REVISION}" : ""
]
}
target "debian-15" {
inherits = ["debian"]
platforms = ["linux/amd64", "linux/arm64", "linux/arm/v7", "linux/s390x", "linux/ppc64le"]
args = {"BASETAG" = "15"}
tags = [
"${REGISTRY_PREFIX}${IMAGE_NAME}:15",
notequal("", BUILD_REVISION) ? "${REGISTRY_PREFIX}${IMAGE_NAME}:15-debian-${BUILD_REVISION}" : ""
]
}
target "alpine-15" {
inherits = ["alpine"]
platforms = ["linux/amd64", "linux/arm64", "linux/arm/v7", "linux/s390x", "linux/ppc64le"]
args = {"BASETAG" = "15-alpine"}
tags = [
"${REGISTRY_PREFIX}${IMAGE_NAME}:15-alpine",
notequal("", BUILD_REVISION) ? "${REGISTRY_PREFIX}${IMAGE_NAME}:15-alpine-${BUILD_REVISION}" : ""
]
}
target "debian-14" {
inherits = ["debian"]
platforms = ["linux/amd64", "linux/arm64", "linux/arm/v7", "linux/s390x", "linux/ppc64le"]
args = {"BASETAG" = "14"}
tags = [
"${REGISTRY_PREFIX}${IMAGE_NAME}:14",
notequal("", BUILD_REVISION) ? "${REGISTRY_PREFIX}${IMAGE_NAME}:14-debian-${BUILD_REVISION}" : ""
]
}
target "alpine-14" {
inherits = ["alpine"]
platforms = ["linux/amd64", "linux/arm64", "linux/arm/v7", "linux/s390x", "linux/ppc64le"]
args = {"BASETAG" = "14-alpine"}
tags = [
"${REGISTRY_PREFIX}${IMAGE_NAME}:14-alpine",
notequal("", BUILD_REVISION) ? "${REGISTRY_PREFIX}${IMAGE_NAME}:14-alpine-${BUILD_REVISION}" : ""
]
}
target "debian-13" {
inherits = ["debian"]
platforms = ["linux/amd64", "linux/arm64", "linux/arm/v7", "linux/s390x", "linux/ppc64le"]
args = {"BASETAG" = "13"}
tags = [
"${REGISTRY_PREFIX}${IMAGE_NAME}:13",
notequal("", BUILD_REVISION) ? "${REGISTRY_PREFIX}${IMAGE_NAME}:13-debian-${BUILD_REVISION}" : ""
]
}
target "alpine-13" {
inherits = ["alpine"]
platforms = ["linux/amd64", "linux/arm64", "linux/arm/v7", "linux/s390x", "linux/ppc64le"]
args = {"BASETAG" = "13-alpine"}
tags = [
"${REGISTRY_PREFIX}${IMAGE_NAME}:13-alpine",
notequal("", BUILD_REVISION) ? "${REGISTRY_PREFIX}${IMAGE_NAME}:13-alpine-${BUILD_REVISION}" : ""
]
}
target "debian-12" {
inherits = ["debian"]
platforms = ["linux/amd64", "linux/arm64", "linux/arm/v7", "linux/s390x", "linux/ppc64le"]
args = {"BASETAG" = "12"}
tags = [
"${REGISTRY_PREFIX}${IMAGE_NAME}:12",
notequal("", BUILD_REVISION) ? "${REGISTRY_PREFIX}${IMAGE_NAME}:12-debian-${BUILD_REVISION}" : ""
]
}
target "alpine-12" {
inherits = ["alpine"]
platforms = ["linux/amd64", "linux/arm64", "linux/arm/v7", "linux/s390x", "linux/ppc64le"]
args = {"BASETAG" = "12-alpine"}
tags = [
"${REGISTRY_PREFIX}${IMAGE_NAME}:12-alpine",
notequal("", BUILD_REVISION) ? "${REGISTRY_PREFIX}${IMAGE_NAME}:12-alpine-${BUILD_REVISION}" : ""
]
}