File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ FROM golang:1.24 AS builder
1919ARG TARGETOS
2020ARG TARGETARCH
2121ARG GCFLAGS
22+ ARG GOPROXY
23+ ENV GOPROXY=$GOPROXY
2224
2325WORKDIR /workspace
2426# Copy the Go Modules manifests
Original file line number Diff line number Diff line change @@ -84,6 +84,7 @@ TARGETARCH ?= $(shell go env GOARCH)
8484GO_BUILD_OPTS ?= CGO_ENABLED=0 GOOS=$(TARGETOS ) GOARCH=$(TARGETARCH )
8585GO_LDFLAGS ?= $(VERSION_LDFLAGS )
8686GO_GCFLAGS ?=
87+ GOPROXY ?=
8788
8889# PKGs to test
8990PKGS = $$(go list ./... | grep -v /e2e | grep -v ".*/mocks" )
@@ -172,7 +173,7 @@ build: $(BUILDDIR) ## Build manager binary.
172173# More info: https://docs.docker.com/develop/develop-images/build_enhancements/
173174.PHONY : docker-build
174175docker-build : # # Build docker image with the manager.
175- $(CONTAINER_TOOL ) build -t ${IMG} .
176+ $(CONTAINER_TOOL ) build -t ${IMG} --build-arg GOPROXY= " $( GOPROXY ) " .
176177
177178.PHONY : docker-push
178179docker-push : # # Push docker image with the manager.
You can’t perform that action at this time.
0 commit comments