Skip to content

Commit

Permalink
Convert to TAG_PREFIX format
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorific committed Nov 20, 2024
1 parent e1a1688 commit 9fc9d5e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
2 changes: 2 additions & 0 deletions prometheus/alertmanager/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
README.md
test/
6 changes: 4 additions & 2 deletions prometheus/alertmanager/Containerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
15 changes: 6 additions & 9 deletions prometheus/alertmanager/docker-bake.hcl
Original file line number Diff line number Diff line change
@@ -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")
Expand All @@ -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"
}
}
Expand Down

0 comments on commit 9fc9d5e

Please sign in to comment.