mirror of
https://github.com/linux-do/new-api.git
synced 2025-11-14 01:43:44 +08:00
update build files
Signed-off-by: wozulong <>
This commit is contained in:
12
Dockerfile
12
Dockerfile
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user