From 9d632bc7de33c9f03369a766d6cc03647d067ee2 Mon Sep 17 00:00:00 2001 From: yedf2 <120050102@qq.com> Date: Sat, 23 Sep 2023 19:28:09 +0800 Subject: [PATCH] update dockerfile --- helper/Dockerfile-release | 3 +++ 1 file changed, 3 insertions(+) diff --git a/helper/Dockerfile-release b/helper/Dockerfile-release index 1cdfa7c..bec046a 100644 --- a/helper/Dockerfile-release +++ b/helper/Dockerfile-release @@ -15,8 +15,11 @@ EXPOSE 8080 COPY . . # COPY --from=builder1 /app/dtm/admin/dist /app/dtm/admin RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -ldflags="-s -w -X main.Version=$RELEASE_VERSION" +RUN cd admin && npm install -g yarn && yarn && VITE_ADMIN_VERSION=$RELEASE_VERSION yarn build FROM --platform=$TARGETPLATFORM alpine COPY --from=builder2 /app/dtm/dtm /app/dtm/ +COPY --from=builder2 /app/dtm/admin/index.html /app/dtm/admin/ +COPY --from=builder2 /app/dtm/admin/dist /app/dtm/admin/ WORKDIR /app/dtm ENTRYPOINT ["/app/dtm/dtm"]