mirror of
https://github.com/headroomlabs-ai/headroom.git
synced 2026-08-27 14:17:10 -04:00
refactor(docker): migrate to bake with multi-variant distroless images
This commit is contained in:
parent
944b35d78b
commit
63aebe8235
4 changed files with 209 additions and 39 deletions
88
docker-bake.hcl
Normal file
88
docker-bake.hcl
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
target "docker-metadata-action" {}
|
||||
|
||||
target "_common" {
|
||||
context = "."
|
||||
dockerfile = "Dockerfile"
|
||||
platforms = ["linux/amd64", "linux/arm64"]
|
||||
}
|
||||
|
||||
target "runtime-default" {
|
||||
inherits = ["_common", "docker-metadata-action"]
|
||||
target = "runtime"
|
||||
args = {
|
||||
HEADROOM_EXTRAS = "proxy"
|
||||
RUNTIME_USER = "nonroot"
|
||||
}
|
||||
}
|
||||
|
||||
target "runtime" {
|
||||
inherits = ["_common", "docker-metadata-action"]
|
||||
target = "runtime"
|
||||
args = {
|
||||
HEADROOM_EXTRAS = "proxy"
|
||||
RUNTIME_USER = "root"
|
||||
}
|
||||
}
|
||||
|
||||
target "runtime-nonroot" {
|
||||
inherits = ["_common", "docker-metadata-action"]
|
||||
target = "runtime"
|
||||
args = {
|
||||
HEADROOM_EXTRAS = "proxy"
|
||||
RUNTIME_USER = "nonroot"
|
||||
}
|
||||
}
|
||||
|
||||
target "runtime-code" {
|
||||
inherits = ["_common", "docker-metadata-action"]
|
||||
target = "runtime"
|
||||
args = {
|
||||
HEADROOM_EXTRAS = "proxy,code"
|
||||
RUNTIME_USER = "root"
|
||||
}
|
||||
}
|
||||
|
||||
target "runtime-code-nonroot" {
|
||||
inherits = ["_common", "docker-metadata-action"]
|
||||
target = "runtime"
|
||||
args = {
|
||||
HEADROOM_EXTRAS = "proxy,code"
|
||||
RUNTIME_USER = "nonroot"
|
||||
}
|
||||
}
|
||||
|
||||
target "runtime-slim" {
|
||||
inherits = ["_common", "docker-metadata-action"]
|
||||
target = "runtime-slim"
|
||||
args = {
|
||||
HEADROOM_EXTRAS = "proxy"
|
||||
RUNTIME_USER = "root"
|
||||
}
|
||||
}
|
||||
|
||||
target "runtime-slim-nonroot" {
|
||||
inherits = ["_common", "docker-metadata-action"]
|
||||
target = "runtime-slim"
|
||||
args = {
|
||||
HEADROOM_EXTRAS = "proxy"
|
||||
RUNTIME_USER = "nonroot"
|
||||
}
|
||||
}
|
||||
|
||||
target "runtime-code-slim" {
|
||||
inherits = ["_common", "docker-metadata-action"]
|
||||
target = "runtime-slim"
|
||||
args = {
|
||||
HEADROOM_EXTRAS = "proxy,code"
|
||||
RUNTIME_USER = "root"
|
||||
}
|
||||
}
|
||||
|
||||
target "runtime-code-slim-nonroot" {
|
||||
inherits = ["_common", "docker-metadata-action"]
|
||||
target = "runtime-slim"
|
||||
args = {
|
||||
HEADROOM_EXTRAS = "proxy,code"
|
||||
RUNTIME_USER = "nonroot"
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue