-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-bake.hcl
More file actions
42 lines (36 loc) · 980 Bytes
/
Copy pathdocker-bake.hcl
File metadata and controls
42 lines (36 loc) · 980 Bytes
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
// Configuration for docker/bake-action: https://github.com/docker/bake-action
// https://github.com/marketplace/actions/docker-metadata-action#bake-definition
// docker-bake.hcl
target "docker-metadata-action" {}
// Create Base Build Target
target "build" {
inherits = ["docker-metadata-action"]
context = "./"
// Use multi-stage Containerfile
dockerfile = "Containerfile.multistage"
}
// Create Platforms Target
target "platforms" {
// Set target platforms for multi-platform builds https://docs.docker.com/build/bake/reference/#targetplatforms
platforms = [
"linux/amd64",
"linux/arm64"
]
}
// Create Multi Platform Build Target
target "multi-platform-build" {
inherits = ["build", "platforms"]
}
// Create GitHub Action Cache Target
target "gha-cache" {
cache-from = [
"type=gha"
]
cache-to = [
"type=gha,mode=max"
]
}
// Create GitHub Action Build Target
target "gha-build" {
inherits = ["multi-platform-build", "gha-cache"]
}