-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathdocker-bake.hcl
More file actions
239 lines (214 loc) · 8.47 KB
/
docker-bake.hcl
File metadata and controls
239 lines (214 loc) · 8.47 KB
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
variable "imageSuffix" {
default = ""
}
variable "tagPrefix" {
default = ""
}
variable "phpMatrix" {
default = [ "8.2.30", "8.3.30", "8.4.20", "8.5.5" ]
}
variable "frankenphpMatrix" {
default = [ "8.2.30", "8.3.30", "8.4.20", "8.5.5" ]
}
# Frankenphp
target "frankenphp" {
name = "frankenphp-${replace(substr(php, 0, 3), ".", "-")}"
context = "./frankenphp"
matrix = {
"php" = frankenphpMatrix
}
args = {
"PHP_VERSION" = php
}
platforms = [ "linux/amd64", "linux/arm64" ]
tags = imageSuffix != "" ? [
"ghcr.io/shopware/docker-base${imageSuffix}:${tagPrefix}${substr(php, 0, 3)}-frankenphp",
"ghcr.io/shopware/docker-base${imageSuffix}:${tagPrefix}${php}-frankenphp"
] : [
"shopware/docker-base${imageSuffix}:${tagPrefix}${substr(php, 0, 3)}-frankenphp",
"shopware/docker-base${imageSuffix}:${tagPrefix}${php}-frankenphp",
"ghcr.io/shopware/docker-base${imageSuffix}:${tagPrefix}${substr(php, 0, 3)}-frankenphp",
"ghcr.io/shopware/docker-base${imageSuffix}:${tagPrefix}${php}-frankenphp"
]
}
target "frankenphp-otel" {
name = "frankenphp-otel-${replace(substr(php, 0, 3), ".", "-")}"
context = "./frankenphp-otel"
matrix = {
"php" = frankenphpMatrix
}
contexts = {
base = "docker-image://ghcr.io/shopware/docker-base${imageSuffix}:${tagPrefix}${php}-frankenphp"
}
platforms = [ "linux/amd64", "linux/arm64" ]
tags = imageSuffix != "" ? [
"ghcr.io/shopware/docker-base${imageSuffix}:${tagPrefix}${substr(php, 0, 3)}-frankenphp-otel",
"ghcr.io/shopware/docker-base${imageSuffix}:${tagPrefix}${php}-frankenphp-otel"
] : [
"shopware/docker-base${imageSuffix}:${tagPrefix}${substr(php, 0, 3)}-frankenphp-otel",
"shopware/docker-base${imageSuffix}:${tagPrefix}${php}-frankenphp-otel",
"ghcr.io/shopware/docker-base${imageSuffix}:${tagPrefix}${substr(php, 0, 3)}-frankenphp-otel",
"ghcr.io/shopware/docker-base${imageSuffix}:${tagPrefix}${php}-frankenphp-otel"
]
}
# FPM
target "fpm" {
name = "fpm-${replace(substr(php, 0, 3), ".", "-")}"
context = "./fpm"
matrix = {
"php" = phpMatrix
}
contexts = {
base = "docker-image://docker.io/library/php:${php}-fpm-alpine"
}
platforms = [ "linux/amd64", "linux/arm64" ]
tags = imageSuffix != "" ? [
"ghcr.io/shopware/docker-base${imageSuffix}:${tagPrefix}${substr(php, 0, 3)}-fpm",
"ghcr.io/shopware/docker-base${imageSuffix}:${tagPrefix}${php}-fpm"
] : [
"shopware/docker-base${imageSuffix}:${tagPrefix}${substr(php, 0, 3)}-fpm",
"shopware/docker-base${imageSuffix}:${tagPrefix}${php}-fpm",
"ghcr.io/shopware/docker-base${imageSuffix}:${tagPrefix}${substr(php, 0, 3)}-fpm",
"ghcr.io/shopware/docker-base${imageSuffix}:${tagPrefix}${php}-fpm"
]
}
target "fpm-otel" {
name = "fpm-otel-${replace(substr(php, 0, 3), ".", "-")}"
context = "./fpm-otel"
matrix = {
"php" = phpMatrix
}
contexts = {
base = "docker-image://ghcr.io/shopware/docker-base${imageSuffix}:${tagPrefix}${php}-fpm"
}
platforms = [ "linux/amd64", "linux/arm64" ]
tags = imageSuffix != "" ? [
"ghcr.io/shopware/docker-base${imageSuffix}:${tagPrefix}${substr(php, 0, 3)}-fpm-otel",
"ghcr.io/shopware/docker-base${imageSuffix}:${tagPrefix}${php}-fpm-otel"
] : [
"shopware/docker-base${imageSuffix}:${tagPrefix}${substr(php, 0, 3)}-fpm-otel",
"shopware/docker-base${imageSuffix}:${tagPrefix}${php}-fpm-otel",
"ghcr.io/shopware/docker-base${imageSuffix}:${tagPrefix}${substr(php, 0, 3)}-fpm-otel",
"ghcr.io/shopware/docker-base${imageSuffix}:${tagPrefix}${php}-fpm-otel"
]
}
# Caddy
target "caddy" {
name = "caddy-${replace(substr(php, 0, 3), ".", "-")}"
context = "./caddy"
matrix = {
"php" = phpMatrix
}
contexts = {
base = "docker-image://ghcr.io/shopware/docker-base${imageSuffix}:${tagPrefix}${php}-fpm"
}
platforms = [ "linux/amd64", "linux/arm64" ]
tags = imageSuffix != "" ? [
"ghcr.io/shopware/docker-base${imageSuffix}:${tagPrefix}${substr(php, 0, 3)}-caddy",
"ghcr.io/shopware/docker-base${imageSuffix}:${tagPrefix}${php}-caddy"
] : [
"shopware/docker-base${imageSuffix}:${tagPrefix}${substr(php, 0, 3)}-caddy",
"shopware/docker-base${imageSuffix}:${tagPrefix}${php}-caddy",
"ghcr.io/shopware/docker-base${imageSuffix}:${tagPrefix}${substr(php, 0, 3)}-caddy",
"ghcr.io/shopware/docker-base${imageSuffix}:${tagPrefix}${php}-caddy"
]
}
target "caddy-otel" {
name = "caddy-otel-${replace(substr(php, 0, 3), ".", "-")}"
context = "./caddy"
matrix = {
"php" = phpMatrix
}
contexts = {
base = "docker-image://ghcr.io/shopware/docker-base${imageSuffix}:${tagPrefix}${php}-fpm-otel"
}
platforms = [ "linux/amd64", "linux/arm64" ]
tags = imageSuffix != "" ? [
"ghcr.io/shopware/docker-base${imageSuffix}:${tagPrefix}${substr(php, 0, 3)}-caddy-otel",
"ghcr.io/shopware/docker-base${imageSuffix}:${tagPrefix}${php}-caddy-otel"
] : [
"shopware/docker-base${imageSuffix}:${tagPrefix}${substr(php, 0, 3)}-caddy-otel",
"shopware/docker-base${imageSuffix}:${tagPrefix}${php}-caddy-otel",
"ghcr.io/shopware/docker-base${imageSuffix}:${tagPrefix}${substr(php, 0, 3)}-caddy-otel",
"ghcr.io/shopware/docker-base${imageSuffix}:${tagPrefix}${php}-caddy-otel"
]
}
target "caddy-dev" {
name = "caddy-dev-${replace(substr(php, 0, 3), ".", "-")}-${node}"
context = "./dev"
matrix = {
"php" = phpMatrix
"node" = [ "22", "24" ]
}
contexts = {
base = "docker-image://ghcr.io/shopware/docker-base${imageSuffix}:${tagPrefix}${php}-caddy-otel"
}
args = {
"NODE_VERSION" = node
}
platforms = [ "linux/amd64", "linux/arm64" ]
tags = [
"ghcr.io/shopware/docker-dev${imageSuffix}:${tagPrefix}php${substr(php, 0, 3)}-node${node}-caddy",
"ghcr.io/shopware/docker-dev${imageSuffix}:${tagPrefix}php${php}-node${node}-caddy"
]
}
# Nginx
target "nginx" {
name = "nginx-${replace(substr(php, 0, 3), ".", "-")}"
context = "./nginx"
matrix = {
"php" = phpMatrix
}
contexts = {
base = "docker-image://ghcr.io/shopware/docker-base${imageSuffix}:${tagPrefix}${php}-fpm"
}
platforms = [ "linux/amd64", "linux/arm64" ]
tags = imageSuffix != "" ? [
"ghcr.io/shopware/docker-base${imageSuffix}:${tagPrefix}${substr(php, 0, 3)}-nginx",
"ghcr.io/shopware/docker-base${imageSuffix}:${tagPrefix}${php}-nginx"
] : [
"shopware/docker-base${imageSuffix}:${tagPrefix}${substr(php, 0, 3)}-nginx",
"shopware/docker-base${imageSuffix}:${tagPrefix}${php}-nginx",
"ghcr.io/shopware/docker-base${imageSuffix}:${tagPrefix}${substr(php, 0, 3)}-nginx",
"ghcr.io/shopware/docker-base${imageSuffix}:${tagPrefix}${php}-nginx"
]
}
target "nginx-otel" {
name = "nginx-otel-${replace(substr(php, 0, 3), ".", "-")}"
context = "./nginx"
matrix = {
"php" = phpMatrix
}
contexts = {
base = "docker-image://ghcr.io/shopware/docker-base${imageSuffix}:${tagPrefix}${php}-fpm-otel"
}
platforms = [ "linux/amd64", "linux/arm64" ]
tags = imageSuffix != "" ? [
"ghcr.io/shopware/docker-base${imageSuffix}:${tagPrefix}${substr(php, 0, 3)}-nginx-otel",
"ghcr.io/shopware/docker-base${imageSuffix}:${tagPrefix}${php}-nginx-otel"
] : [
"shopware/docker-base${imageSuffix}:${tagPrefix}${substr(php, 0, 3)}-nginx-otel",
"shopware/docker-base${imageSuffix}:${tagPrefix}${php}-nginx-otel",
"ghcr.io/shopware/docker-base${imageSuffix}:${tagPrefix}${substr(php, 0, 3)}-nginx-otel",
"ghcr.io/shopware/docker-base${imageSuffix}:${tagPrefix}${php}-nginx-otel"
]
}
target "nginx-dev" {
name = "nginx-dev-${replace(substr(php, 0, 3), ".", "-")}-${node}"
context = "./dev"
matrix = {
"php" = phpMatrix
"node" = [ "22", "24" ]
}
contexts = {
base = "docker-image://ghcr.io/shopware/docker-base${imageSuffix}:${tagPrefix}${php}-nginx-otel"
}
args = {
"NODE_VERSION" = node
}
platforms = [ "linux/amd64", "linux/arm64" ]
tags = [
"ghcr.io/shopware/docker-dev${imageSuffix}:${tagPrefix}php${substr(php, 0, 3)}-node${node}-nginx",
"ghcr.io/shopware/docker-dev${imageSuffix}:${tagPrefix}php${php}-node${node}-nginx"
]
}