fix: fix Dockerfile

This commit is contained in:
JustSong 2024-01-07 15:12:30 +08:00
parent d37f836d53
commit e80cd508ba

View File

@ -7,6 +7,7 @@ COPY ./web/default .
COPY ./VERSION .
RUN mkdir -p ../build/default
RUN GENERATE_SOURCEMAP='false' DISABLE_ESLINT_PLUGIN='true' REACT_APP_VERSION=$(cat VERSION) npm run build
RUN mv build/* ../build/default
WORKDIR /web/berry
COPY web/berry/package.json .
@ -15,6 +16,7 @@ COPY ./web/berry .
COPY ./VERSION .
RUN mkdir -p ../build/berry
RUN GENERATE_SOURCEMAP='false' DISABLE_ESLINT_PLUGIN='true' REACT_APP_VERSION=$(cat VERSION) npm run build
RUN mv build/* ../build/berry
WORKDIR /web/build
RUN ls
@ -31,7 +33,8 @@ RUN go mod download
COPY . .
COPY --from=builder /web/build ./web
RUN ls ./web
RUN ls ./web/default
RUN ls ./web/build
RUN ls ./web/build/default
RUN go build -ldflags "-s -w -X 'one-api/common.Version=$(cat VERSION)' -extldflags '-static'" -o one-api
FROM alpine