Files
nick 57e0ccd5b6
Container / docker (push) Successful in 43s
added python:3.12-slim-bookwork
2026-09-19 14:28:09 -07:00

70 lines
1.3 KiB
HCL

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", "python"]
}
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")
}
target "python" {
dockerfile = "Dockerfile"
args = {
BASE_IMAGE = "python:3.12-slim-bookworm"
}
tags = image_tags("python", "3.12-slim-bookworm")
}