fix(0.2.1): 运行时镜像 npm ci 加 --omit=optional (跳过 devOptional 的 better-sqlite3, 免 node-gyp)
This commit is contained in:
+2
-2
@@ -50,9 +50,9 @@ WORKDIR /app
|
||||
# 阿里源加速
|
||||
RUN npm config set registry https://registry.npmmirror.com
|
||||
|
||||
# 只装运行时依赖
|
||||
# 只装运行时依赖 (better-sqlite3 是 @powersync/node 的 devOptional peer, 需同时 omit optional 才能跳过)
|
||||
COPY package*.json ./
|
||||
RUN --mount=type=cache,target=/root/.npm npm ci --omit=dev
|
||||
RUN --mount=type=cache,target=/root/.npm npm ci --omit=dev --omit=optional
|
||||
|
||||
# 拷贝构建产物
|
||||
COPY --from=builder /app/dist ./dist
|
||||
|
||||
Reference in New Issue
Block a user