update build files

Signed-off-by: wozulong <>
This commit is contained in:
wozulong
2024-03-20 18:31:22 +08:00
parent f35e63e3f3
commit 8b55116563
5 changed files with 10682 additions and 13 deletions

View File

@@ -2,13 +2,14 @@ FROM node:16-slim as builder
WORKDIR /build
COPY web/package.json .
RUN npm install
COPY web/yarn.lock .
RUN yarn install
COPY ./web .
COPY ./VERSION .
RUN DISABLE_ESLINT_PLUGIN='true' REACT_APP_VERSION=$(cat VERSION) npm run build
RUN DISABLE_ESLINT_PLUGIN='true' REACT_APP_VERSION=$(cat VERSION) yarn build
FROM golang:1.19-alpine AS builder2
RUN apk add build-base
RUN apk add --no-cache build-base
ENV GO111MODULE=on \
CGO_ENABLED=1 \
GOOS=linux
@@ -23,11 +24,6 @@ RUN go mod tidy \
FROM alpine
RUN apk update \
&& apk upgrade \
&& apk add --no-cache ca-certificates tzdata \
&& update-ca-certificates 2>/dev/null || true
COPY --from=builder2 /build/one-api /
EXPOSE 3000
WORKDIR /data