diff --git a/prometheus/alertmanager/.dockerignore b/prometheus/alertmanager/.dockerignore new file mode 100644 index 0000000..87ae095 --- /dev/null +++ b/prometheus/alertmanager/.dockerignore @@ -0,0 +1,2 @@ +README.md +test/ diff --git a/prometheus/alertmanager/Containerfile b/prometheus/alertmanager/Containerfile index e1319c1..4bcaa1a 100644 --- a/prometheus/alertmanager/Containerfile +++ b/prometheus/alertmanager/Containerfile @@ -1,5 +1,7 @@ -ARG CONTAINER_REGISTRY=docker.io -FROM $CONTAINER_REGISTRY/ubuntu:noble-20241015 AS base +# syntax=docker/dockerfile:1 +ARG BASE_IMAGE=docker.io/ubuntu:noble-20241015 +# hadolint ignore=DL3006 +FROM $BASE_IMAGE AS base ARG ALERTMANAGER_URL_AMD64 ARG ALERTMANAGER_SHA256_AMD64 diff --git a/prometheus/alertmanager/docker-bake.hcl b/prometheus/alertmanager/docker-bake.hcl index 0c8f3a5..e6b2114 100644 --- a/prometheus/alertmanager/docker-bake.hcl +++ b/prometheus/alertmanager/docker-bake.hcl @@ -1,15 +1,11 @@ -variable "IMAGE_NAME" { - default = "alertmanager" +variable "TAG_PREFIX" { + default = "docker.io/boxcutter/alertmanager" } variable "VERSION" { default = "0.27.0" } -variable "CONTAINER_REGISTRY" { - default = "docker.io/boxcutter" -} - # There's no darwin-based Docker, so if we're running on macOS, change the platform to linux variable "LOCAL_PLATFORM" { default = regex_replace("${BAKE_LOCAL_PLATFORM}", "^(darwin)", "linux") @@ -26,14 +22,15 @@ target "_common" { ALERTMANAGER_SHA256_ARMHF = "10800f0256873c2eed843297f2a49958f743f6497eada7f7fb8f35aa1d009b53" } tags = [ - "${CONTAINER_REGISTRY}/${IMAGE_NAME}:${VERSION}", - "${CONTAINER_REGISTRY}/${IMAGE_NAME}:latest" + "${TAG_PREFIX}:${VERSION}", + "${TAG_PREFIX}:latest" ] labels = { "org.opencontainers.image.source" = "https://github.com/boxcutter/oci" "org.opencontainers.image.licenses" = "Apache-2.0" "org.opencontainers.image.description" = "Prometheus Alertmanager." - "org.opencontainers.image.title" = "${IMAGE_NAME}" + "org.opencontainers.image.title" = "${TAG_PREFIX}" + "org.opencontainers.image.created" = "${timestamp()}" "dev.boxcutter.image.readme-filepath" = "prometheus/alertmanager/README.md" } }