todo
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
# 多段构建 - 第一阶段:构建应用
|
# 多段构建 - 第一阶段:构建应用
|
||||||
FROM node:16-alpine AS builder
|
# pnpm-lock.yaml 为 lockfileVersion 9,需要 pnpm v9(要求 Node >= 18)
|
||||||
|
FROM node:18-alpine AS builder
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
@@ -18,7 +19,7 @@ RUN if [ -n "$NPM_REGISTRY" ]; then npm config set registry "$NPM_REGISTRY"; fi
|
|||||||
|
|
||||||
RUN set -eux; \
|
RUN set -eux; \
|
||||||
if [ "$PKG_MANAGER" = "pnpm" ]; then \
|
if [ "$PKG_MANAGER" = "pnpm" ]; then \
|
||||||
npm i -g pnpm@8 && pnpm i --frozen-lockfile; \
|
npm i -g pnpm@9 && pnpm i --frozen-lockfile; \
|
||||||
elif [ "$PKG_MANAGER" = "npm" ]; then \
|
elif [ "$PKG_MANAGER" = "npm" ]; then \
|
||||||
npm ci --no-audit --fund=false; \
|
npm ci --no-audit --fund=false; \
|
||||||
else \
|
else \
|
||||||
|
|||||||
Reference in New Issue
Block a user