File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44
55[default .extend-words ]
66
7+
78[files ]
89extend-exclude = [
910 " go.mod" ,
Original file line number Diff line number Diff line change 11# SPDX-FileCopyrightText: 2025 SAP SE or an SAP affiliate company
22# SPDX-License-Identifier: Apache-2.0
33
4- FROM golang:1.26.4-alpine3.24 AS builder
4+ ARG IMAGE=golang:1.26.4-alpine3.24
5+
6+ FROM $IMAGE AS builder
57
68RUN apk add --no-cache --no-progress ca-certificates gcc musl-dev git make
79
@@ -14,7 +16,8 @@ RUN make -C /src install PREFIX=/pkg GOTOOLCHAIN=local
1416# To only build the tests run: docker build . --target test
1517# We can't do `FROM builder AS test` here, as then make prepare-static-check would not be cached during interactive use when developing
1618# and caching all the tools, especially golangci-lint, takes a few minutes.
17- FROM golang:1.26.4-alpine3.24 AS test
19+ # Optionally the base image can be overwritten with one where the tools are already installed and cached in.
20+ FROM $IMAGE AS test
1821
1922COPY Makefile /src/Makefile
2023
@@ -42,6 +45,7 @@ USER 4200:4200
4245RUN cd /src \
4346 && { if test -d .git; then git config --global --add safe.directory /src; fi; } \
4447 && make build/cover.out
48+
4549# ###############################################################################
4650
4751FROM alpine:3.24
You can’t perform that action at this time.
0 commit comments