variable "IMAGE" { default = "git.atlashorizon.net/atlashorizon/container-base" } variable "LATEST" { default = "false" } variable "SHA" { default = "" } variable "MANUAL" { default = "false" } function "image_tags" { params = [family, version] result = compact([ "${IMAGE}/${family}:${version}", equal(LATEST, "true") ? "${IMAGE}/${family}:latest" : "", notequal(SHA, "") ? "${IMAGE}/${family}:sha-${SHA}" : "", equal(MANUAL, "true") ? "${IMAGE}/${family}:manual" : "", ]) } group "default" { targets = ["debian", "debian-slim", "ubuntu", "alpine"] } target "debian" { dockerfile = "Dockerfile" args = { BASE_IMAGE = "debian:trixie" } tags = image_tags("debian", "trixie") } target "debian-slim" { dockerfile = "Dockerfile" args = { BASE_IMAGE = "debian:trixie-slim" } tags = image_tags("debian-slim", "trixie") } target "ubuntu" { dockerfile = "Dockerfile" args = { BASE_IMAGE = "ubuntu:24.04" } tags = image_tags("ubuntu", "24.04") } target "alpine" { dockerfile = "Dockerfile" args = { BASE_IMAGE = "alpine:3.24" } tags = image_tags("alpine", "3.24") }