File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 55# COPY . .
66# RUN cd admin && yarn && VITE_ADMIN_VERSION=$RELEASE_VERSION yarn build
77
8- FROM --platform=$TARGETPLATFORM golang:1.18-alpine as builder1
8+ FROM --platform=amd64 node as builder2
99ARG TARGETARCH
1010ARG TARGETOS
1111ARG RELEASE_VERSION
1212WORKDIR /app/dtm
13- # RUN go env -w GOPROXY=https://mirrors.aliyun.com/goproxy/,direct
1413COPY . .
15- RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -ldflags="-s -w -X main.Version= $RELEASE_VERSION"
14+ RUN cd admin && yarn && VITE_ADMIN_VERSION= $RELEASE_VERSION yarn build
1615
17- FROM --platform=amd64 node as builder2
16+ FROM --platform=$TARGETPLATFORM golang:1.18-alpine as builder1
1817ARG TARGETARCH
1918ARG TARGETOS
2019ARG RELEASE_VERSION
2120WORKDIR /app/dtm
21+ # RUN go env -w GOPROXY=https://mirrors.aliyun.com/goproxy/,direct
2222COPY . .
23- RUN cd admin && yarn && VITE_ADMIN_VERSION=$RELEASE_VERSION yarn build
23+ COPY --from=builder2 /app/dtm/admin/dist /app/dtm/admin/dist
24+ RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -ldflags="-s -w -X main.Version=$RELEASE_VERSION"
2425
2526FROM --platform=$TARGETPLATFORM alpine
2627COPY --from=builder1 /app/dtm/dtm /app/dtm/
27- COPY --from=builder2 /app/dtm/admin/dist /app/dtm/admin/dist
2828WORKDIR /app/dtm
2929EXPOSE 8080
3030ENTRYPOINT ["/app/dtm/dtm"]
You can’t perform that action at this time.
0 commit comments