File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 1- FROM opencsg-registry.cn-beijing.cr.aliyuncs.com/opencsg_public/go-node AS build
1+ FROM --platform=$BUILDPLATFORM opencsg-registry.cn-beijing.cr.aliyuncs.com/opencsg_public/go-node AS builder
22RUN mkdir /myapp
33WORKDIR /myapp
44ADD . /myapp
55
6+ ENV CGO_ENABLED=0
67RUN go mod tidy
78RUN cd frontend && yarn install && yarn build
8- RUN go build -o csghub-portal ./cmd/csghub-portal
9+ RUN GOOS=$(echo ${TARGETPLATFORM} | cut -f1 -d '/' ) \
10+ GOARCH=$(echo ${TARGETPLATFORM} | cut -f2 -d '/' ) \
11+ go build -o csghub-portal ./cmd/csghub-portal
912
1013FROM bitnami/minideb:latest
1114RUN apt update && apt install -y ca-certificates && update-ca-certificates
1215WORKDIR /myapp
13- COPY --from=build /myapp/csghub-portal /myapp/csghub-portal
16+ COPY --from=builder /myapp/csghub-portal /myapp/csghub-portal
You can’t perform that action at this time.
0 commit comments