From 868bfc990089f56ec08f06b88b364969c23d17b8 Mon Sep 17 00:00:00 2001 From: coward Date: Tue, 4 Jun 2024 13:14:18 +0800 Subject: [PATCH] =?UTF-8?q?:art:=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 56eb83f..e14c3c8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,25 +4,18 @@ WORKDIR front COPY . . WORKDIR web-src -RUN ls -lh RUN corepack enable RUN corepack prepare pnpm@8.6.10 --activate RUN npm config set registry https://registry.npmmirror.com RUN pnpm install - RUN pnpm build -RUN cd ../web && ls -lh && pwd FROM golang:alpine as build RUN apk add upx - WORKDIR /build - COPY . . COPY --from=build-stage /front/web/ /build/web -RUN cd ./web && ls -lh -RUN cd .. # sqlite必须 ENV GO111MODULE=on ENV GOPROXY=https://goproxy.cn,direct @@ -33,6 +26,7 @@ RUN ls -lh && chmod +x ./app FROM alpine +ENV GIN_MODE=release RUN apk --no-cache add ca-certificates wireguard-tools jq iptables WORKDIR /app @@ -41,6 +35,4 @@ RUN mkdir -p db COPY --from=build /build/app /app COPY --from=build /build/template/* /app/template/ -RUN ls -al - ENTRYPOINT ["./app"] \ No newline at end of file