File tree 2 files changed +5
-2
lines changed
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ ARG TARGETOS
4
4
ARG TARGETARCH
5
5
6
6
WORKDIR /workspace
7
+ ENV GO111MODULE=on \
8
+ GOPROXY=https://goproxy.cn,direct
7
9
# Copy the Go Modules manifests
8
10
COPY go.mod go.mod
9
11
COPY go.sum go.sum
@@ -25,7 +27,8 @@ RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o ma
25
27
26
28
# Use distroless as minimal base image to package the manager binary
27
29
# Refer to https://github.com/GoogleContainerTools/distroless for more details
28
- FROM gcr.io/distroless/static:nonroot
30
+ # FROM gcr.io/distroless/static:nonroot
31
+ FROM gcr.lank8s.cn/distroless/static:nonroot
29
32
WORKDIR /
30
33
COPY --from=builder /workspace/manager .
31
34
USER 65532:65532
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ run: manifests generate fmt vet ## Run a controller from your host.
127
127
# More info: https://docs.docker.com/develop/develop-images/build_enhancements/
128
128
.PHONY : docker-build
129
129
docker-build : test # # Build docker image with the manager.
130
- docker build -t ${IMG} .
130
+ docker build --network=host - t ${IMG} .
131
131
132
132
.PHONY : docker-push
133
133
docker-push : # # Push docker image with the manager.
You can’t perform that action at this time.
0 commit comments