Skip to content

Commit 6841bbe

Browse files
committed
chore(shared/statsd-exporter): Build from explicit golang version
This is part of a series of changes so I can step through each and validate the small change.
1 parent 44e711c commit 6841bbe

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

shared/statsd-exporter/Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# syntax=docker/dockerfile:1.16.0@sha256:e2dd261f92e4b763d789984f6eab84be66ab4f5f08052316d8eb8f173593acf7
2-
# check=error=true
2+
# check=error=true;skip=InvalidDefaultArgInFrom
3+
4+
ARG GOLANG_VERSION
5+
FROM oci.stackable.tech/sdp/library/golang:${GOLANG_VERSION} AS golang-image
36

4-
FROM local-image/stackable-base
57
ARG PRODUCT_VERSION
68
ARG STACKABLE_USER_UID
79

@@ -11,13 +13,11 @@ RUN --mount=type=cache,id=go-statsd-exporter,uid=${STACKABLE_USER_UID},target=/g
1113
microdnf update
1214

1315
# Tar and gzip are used to unpack the statsd_exporter source
14-
# Golang is used to build statsd_exporter
1516
# Git is needed by the cyclonedx-gomod tool to determine the version of statsd_exporter
1617
microdnf install \
1718
tar \
1819
gzip \
19-
git \
20-
golang
20+
git
2121

2222
microdnf clean all
2323
rm -rf /var/cache/yum
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
[metadata]
22
"oci.stackable.tech" = { namespace = "sdp" }
33

4+
[versions."0.28.0".build-arguments]
5+
# Find this in https://github.com/prometheus/statsd_exporter/blob/v0.28.0/go.mod
6+
# You can find the latest patch version at: https://go.dev/doc/devel/release
7+
# Mirror golang (no `v` prefix) via https://github.com/stackabletech/docker-images/actions/workflows/mirror.yaml
8+
# Note: currently mirrored to the `sdp` project, but should probably move elsewhere.
9+
golang-version = "1.22.12"
10+
411
[versions."0.28.0".local-images]
512
stackable-base = "1.0.0"

0 commit comments

Comments
 (0)