Skip to content

Commit 5bcf8ef

Browse files
committed
feat: add support for image building with a custom GOPROXY
Signed-off-by: Ivan Kolodyazhny <[email protected]>
1 parent f282618 commit 5bcf8ef

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ FROM golang:alpine as builder
1818

1919
COPY . /usr/src/k8s-rdma-shared-dp
2020

21+
ARG GOPROXY
22+
ENV GOPROXY=$GOPROXY
23+
2124
ENV HTTP_PROXY $http_proxy
2225
ENV HTTPS_PROXY $https_proxy
2326

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ GOLANGCI_LINT = $(BINDIR)/golangci-lint
4040
# we keep it fixed to avoid it from unexpectedly failing on the project
4141
# in case of a version bump
4242
GOLANGCI_LINT_VER = v1.62.2
43+
GOPROXY ?=
4344
TIMEOUT = 20
4445
Q = $(if $(filter 1,$V),,@)
4546

@@ -109,7 +110,7 @@ test-coverage: test-coverage-tools | ; $(info running coverage tests...) @ ## R
109110
# Container image
110111
.PHONY: image ubi-image
111112
image: | ; $(info Building Docker image...) ## Build conatiner image
112-
$(IMAGE_BUILDER) build --progress=plain -t $(TAG) -f $(DOCKERFILE) $(CURDIR) $(IMAGE_BUILD_OPTS)
113+
$(IMAGE_BUILDER) build --progress=plain -t $(TAG) -f $(DOCKERFILE) GOPROXY="$(GOPROXY)" $(CURDIR) $(IMAGE_BUILD_OPTS)
113114

114115
ubi-image: DOCKERFILE=$(CURDIR)/Dockerfile.ubi
115116
ubi-image: TAG=mellanox/k8s-rdma-shared-dev-plugin-ubi

0 commit comments

Comments
 (0)