Skip to content

Commit

Permalink
perf: improve dockerfile build
Browse files Browse the repository at this point in the history
  • Loading branch information
moonrailgun committed Mar 8, 2024
1 parent ebc91d9 commit 6464a59
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN npm install -g [email protected]
RUN apk add --update --no-cache python3 py3-pip g++ make

# Tianji frontend ------------------------------
FROM base AS docker-static
FROM base AS static
WORKDIR /app/tianji

COPY . .
Expand All @@ -24,15 +24,15 @@ RUN pnpm install --frozen-lockfile
RUN pnpm build:static

# Tianji server ------------------------------
FROM base AS docker-server
FROM base AS app
WORKDIR /app/tianji

COPY . .

RUN pnpm install --filter @tianji/server... --config.dedupe-peer-dependents=false

RUN mkdir -p ./src/server/public
RUN COPY --from=docker-static /app/tianji/src/server/public /app/tianji/src/server/public
COPY --from=static /app/tianji/src/server/public /app/tianji/src/server/public

RUN pnpm build:server

Expand Down

0 comments on commit 6464a59

Please sign in to comment.