File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 1
1
# Use distroless as minimal base image to package the manager binary
2
2
# Refer to https://github.com/GoogleContainerTools/distroless for more details
3
3
FROM gcr.io/distroless/static:nonroot
4
+ ARG TARGETARCH
4
5
WORKDIR /
5
- COPY ./dist/manager .
6
+ COPY ./dist/manager-${TARGETARCH} /manager
6
7
7
8
USER 65532:65532
8
9
Original file line number Diff line number Diff line change @@ -122,8 +122,8 @@ lint: golangci-lint ## Run go lint
122
122
${GOLANGCI_LINT} run -v -c .golangci.yaml ./...
123
123
124
124
.PHONY : build
125
- build : clean # # build operator's binary
126
- CGO_ENABLED=0 GOOS=${HOST_OS} GOARCH=${HOST_ARCH} go build -v -ldflags ' ${LDFLAGS}' -o ${DIST_DIR} /${BIN_NAME} -gcflags ' ${GCFLAGS}' ./cmd
125
+ build : # # build operator's binary
126
+ CGO_ENABLED=0 GOOS=${HOST_OS} GOARCH=${HOST_ARCH} go build -v -ldflags ' ${LDFLAGS}' -o ${DIST_DIR} /${BIN_NAME} - ${HOST_ARCH} -gcflags ' ${GCFLAGS}' ./cmd
127
127
128
128
.PHONY : clean
129
129
clean : # # clean up
You can’t perform that action at this time.
0 commit comments