Skip to content

Commit 6a28e80

Browse files
authored
use local GOPROXY (#322)
1 parent 0efbe08 commit 6a28e80

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Dockerfile

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ FROM ${BUILDER_IMAGE} AS builder
66
ARG TARGETOS=linux
77
ARG TARGETARCH=amd64
88
ARG CGO_ENABLED=0
9+
ARG GOPROXY=
10+
ENV GOPROXY=${GOPROXY}
911

1012
WORKDIR /workspace
1113
# Copy the Go Modules manifests

Makefile

+2
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ IMAGE_REGISTRY ?= inftyai
6666
IMAGE_NAME ?= llmaz
6767
IMAGE_REPO := $(IMAGE_REGISTRY)/$(IMAGE_NAME)
6868
GIT_TAG ?= $(shell git describe --tags --dirty --always)
69+
GOPROXY=${GOPROXY:-""}
6970
IMG ?= $(IMAGE_REPO):$(GIT_TAG)
7071
BUILDER_IMAGE ?= golang:$(GO_VERSION)
7172
KIND_CLUSTER_NAME ?= kind
@@ -176,6 +177,7 @@ run: manifests generate fmt vet ## Run a controller from your host.
176177
PLATFORMS ?= linux/arm64,linux/amd64,linux/s390x,linux/ppc64le
177178
.PHONY: docker-buildx
178179
docker-buildx: ## Build and push docker image for the manager for cross-platform support
180+
export GOPROXY=$(GOPROXY)
179181
# copy existing Dockerfile and insert --platform=${BUILDPLATFORM} into Dockerfile.cross, and preserve the original Dockerfile
180182
sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross
181183
- $(CONTAINER_TOOL) buildx create --name project-v3-builder

0 commit comments

Comments
 (0)