From e0b2d1ae470b8c7ae97c9b804e850646fc5857d6 Mon Sep 17 00:00:00 2001 From: JustSong Date: Sun, 7 Jan 2024 14:55:04 +0800 Subject: [PATCH] fix: fix Dockerfile --- Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 351e9577..4ca7f18e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,5 @@ FROM node:16 as builder -WORKDIR /web/build - WORKDIR /web/default COPY web/default/package.json . RUN npm install @@ -18,6 +16,9 @@ COPY ./VERSION . RUN mkdir -p ../build/berry RUN GENERATE_SOURCEMAP='false' DISABLE_ESLINT_PLUGIN='true' REACT_APP_VERSION=$(cat VERSION) npm run build +WORKDIR /web/build +RUN ls + FROM golang AS builder2 ENV GO111MODULE=on \ @@ -28,7 +29,7 @@ WORKDIR /build ADD go.mod go.sum ./ RUN go mod download COPY . . -COPY --from=builder /web/build ./web/build +COPY --from=builder /web/build ./web RUN go build -ldflags "-s -w -X 'one-api/common.Version=$(cat VERSION)' -extldflags '-static'" -o one-api FROM alpine