fix: fix Dockerfile
This commit is contained in:
parent
aa3f605894
commit
965d7fc3d2
28
Dockerfile
28
Dockerfile
@ -1,24 +1,21 @@
|
|||||||
FROM node:16 as builder
|
FROM node:16 as builder
|
||||||
|
|
||||||
WORKDIR /web/default
|
WORKDIR /web
|
||||||
COPY web/default/package.json .
|
|
||||||
RUN npm install
|
|
||||||
COPY ./web/default .
|
|
||||||
COPY ./VERSION .
|
COPY ./VERSION .
|
||||||
RUN mkdir -p ../build/default
|
COPY ./web .
|
||||||
RUN GENERATE_SOURCEMAP='false' DISABLE_ESLINT_PLUGIN='true' REACT_APP_VERSION=$(cat VERSION) npm run build
|
|
||||||
RUN ls
|
WORKDIR /web/default
|
||||||
|
RUN npm install
|
||||||
|
RUN DISABLE_ESLINT_PLUGIN='true' REACT_APP_VERSION=$(cat VERSION) npm run build
|
||||||
|
|
||||||
WORKDIR /web/berry
|
WORKDIR /web/berry
|
||||||
COPY web/berry/package.json .
|
|
||||||
RUN npm install
|
RUN npm install
|
||||||
COPY ./web/berry .
|
RUN DISABLE_ESLINT_PLUGIN='true' REACT_APP_VERSION=$(cat VERSION) npm run build
|
||||||
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
|
WORKDIR /web
|
||||||
RUN ls
|
RUN ls
|
||||||
|
RUN ls ./build
|
||||||
|
RUN ls ./build/default
|
||||||
|
|
||||||
FROM golang AS builder2
|
FROM golang AS builder2
|
||||||
|
|
||||||
@ -30,10 +27,7 @@ WORKDIR /build
|
|||||||
ADD go.mod go.sum ./
|
ADD go.mod go.sum ./
|
||||||
RUN go mod download
|
RUN go mod download
|
||||||
COPY . .
|
COPY . .
|
||||||
COPY --from=builder /web/build ./web
|
COPY --from=builder /web/build ./web/build
|
||||||
RUN ls ./web
|
|
||||||
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
|
RUN go build -ldflags "-s -w -X 'one-api/common.Version=$(cat VERSION)' -extldflags '-static'" -o one-api
|
||||||
|
|
||||||
FROM alpine
|
FROM alpine
|
||||||
|
Loading…
Reference in New Issue
Block a user