File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 1717# Build the image
1818FROM golang:1.24 as builder
1919
20+ ARG GOPROXY
21+ ENV GOPROXY=$GOPROXY
22+
2023WORKDIR /workspace
2124# Copy the Go Modules manifests
2225COPY go.mod go.mod
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ TARGET_ARCH ?= $(shell go env GOARCH)
3838GO_BUILD_OPTS ?= CGO_ENABLED=0 GOOS=$(TARGET_OS ) GOARCH=$(TARGET_ARCH )
3939# Linker flags for go build command
4040GO_LDFLAGS = $(VERSION_LDFLAGS )
41+ GOPROXY ?=
4142
4243
4344PKGS = $(or $(PKG ) ,$(shell cd $(PROJECT_DIR ) && go list ./...) )
@@ -91,7 +92,7 @@ build: ## Build binary
9192
9293.PHONY : docker-build
9394docker-build : # # Build docker image with ipam binaries
94- $(DOCKER_CMD ) build -t $(IMG ) -f $(DOCKERFILE ) .
95+ $(DOCKER_CMD ) build -t $(IMG ) -f $(DOCKERFILE ) --build-arg GOPROXY= " $( GOPROXY ) " .
9596
9697.PHONY : docker-push
9798docker-push : # # Push docker image with ipam binaries
You can’t perform that action at this time.
0 commit comments