variable "registry" { default = "repo.nstart.cloud" } variable "base_repo" { default = "repo.nstart.cloud/" } variable "VERSION" { default = "1.0.2" } function "oci_labels" { params = [name] result = { "org.opencontainers.image.version" = VERSION, "org.opencontainers.image.vendor" = "New Start", "org.opencontainers.image.authors" = "Sychev Nikita ", } } function "image_ref" { params = [name] result = registry != "" ? "${registry}/nstart/vaultwarden-${name}" : "nstart/vaultwarden-${name}" } target "image" { name = combo.image matrix = { combo = [ { image = "server" }, { image = "backup" }, { image = "proxy" } ] } platforms = ["linux/amd64"] output = ["type=image"] attest = [ "type=sbom,generator=${registry}/docker/buildkit-syft-scanner:stable-1", "type=provenance,mode=max" ] context = combo.image dockerfile = "Dockerfile" args = { BASE_REPO = base_repo } tags = [ "${image_ref(combo.image)}:${VERSION}", "${image_ref(combo.image)}:latest", ] labels = oci_labels(combo.image) } group "all" { targets = ["image"] }