File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 11# Use distroless as minimal base image to package the manager binary
22# Refer to https://github.com/GoogleContainerTools/distroless for more details
33FROM gcr.io/distroless/static:nonroot
4+ ARG TARGETARCH
45WORKDIR /
5- COPY ./dist/api .
6+ COPY ./dist/api-${TARGETARCH} /api
67
78USER 65532:65532
89
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ $(LOCALBIN):
2626
2727.PHONY : build
2828build : # # build binary
29- CGO_ENABLED=0 GOOS=${HOST_OS} GOARCH=${HOST_ARCH} go build -v -ldflags ' ${LDFLAGS}' -o ${DIST_DIR} /api -gcflags ' ${GCFLAGS}' ./cmd/gitfusion-api
29+ CGO_ENABLED=0 GOOS=${HOST_OS} GOARCH=${HOST_ARCH} go build -v -ldflags ' ${LDFLAGS}' -o ${DIST_DIR} /api- ${HOST_ARCH} -gcflags ' ${GCFLAGS}' ./cmd/gitfusion-api
3030
3131.PHONY : generate
3232generate : oapi-codegen # Generate the server code from OpenAPI spec
You can’t perform that action at this time.
0 commit comments