summaryrefslogtreecommitdiff
path: root/Bake.md
blob: 16d140b562f1f6a20841bf505394622b89af40f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
---
tags:
---
[[Docker]] [[Docker images]]

Bake is a tool that manages docker build configurations, that are easily referenced e.g: `docker buildx bake <target>`.

It uses a config file: `docker-bake.hcl`. With it you can specify multiple targets and their build switches (as one would pass directly to docker build):

```docker-bake.hcl
target "test" {
  dockerfile = "docker/test.Dockerfile"
}

target "debian" {
  dockerfile = "docker/debian.Dockerfile"
}

target "ci" {
  dockerfile = "docker/ci.Dockerfile"
}
```