From fb11864497074df82303ba4ce5868a3d20c605c2 Mon Sep 17 00:00:00 2001 From: Markus Pesch Date: Wed, 22 Oct 2025 22:39:27 +0200 Subject: [PATCH] fix(ci): add build args containing GO environment variables --- Dockerfile | 3 +++ Makefile | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/Dockerfile b/Dockerfile index 06d150b..173ef31 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,9 @@ FROM docker.io/library/golang:1.25.3-alpine3.21 AS build ARG DC_VERSION=main +ARG GONOSUMDB +ARG GOPRIVATE +ARG GOPROXY RUN set -ex && \ apk update && \ diff --git a/Makefile b/Makefile index b6c144e..bcd588c 100644 --- a/Makefile +++ b/Makefile @@ -17,12 +17,20 @@ DC_IMAGE_NAME:=docker-compose DC_IMAGE_VERSION?=latest DC_IMAGE_FULLY_QUALIFIED=${DC_IMAGE_REGISTRY_NAME}/${DC_IMAGE_NAMESPACE}/${DC_IMAGE_NAME}:${DC_IMAGE_VERSION} +# Golang related environment variables +GONOSUMDB?= +GOPRIVATE?= +GOPROXY?= + # BUILD CONTAINER IMAGE # ===================================================================================================================== PHONY:=container-image/build container-image/build: ${CONTAINER_RUNTIME} build \ --build-arg DC_VERSION=${DC_VERSION} \ + --build-arg GONOSUMDB=${GONOSUMDB} \ + --build-arg GOPRIVATE=${GOPRIVATE} \ + --build-arg GOPROXY=${GOPROXY} \ --file Dockerfile \ --no-cache \ --pull \