fix:vite-plugin-imagemin 的原生依赖在 Alpine 上编译失败
Some checks failed
Build and Deploy Front / deploy (push) Failing after 1m37s
Some checks failed
Build and Deploy Front / deploy (push) Failing after 1m37s
This commit is contained in:
parent
f590e77877
commit
211b440034
@ -2,12 +2,12 @@
|
|||||||
# 基础镜像走 DaoCloud,避免 Kaniko 直连 docker.io 超时
|
# 基础镜像走 DaoCloud,避免 Kaniko 直连 docker.io 超时
|
||||||
FROM docker.m.daocloud.io/library/node:20-alpine AS build
|
FROM docker.m.daocloud.io/library/node:20-alpine AS build
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
# 不用 corepack(要求 packageManager 带版本且在部分环境易挂),直接装 pnpm
|
|
||||||
RUN npm config set registry https://registry.npmmirror.com \
|
RUN npm config set registry https://registry.npmmirror.com \
|
||||||
&& npm install -g pnpm@9.15.9
|
&& npm install -g pnpm@9.15.9
|
||||||
COPY package.json pnpm-lock.yaml ./
|
COPY package.json pnpm-lock.yaml ./
|
||||||
|
# --ignore-scripts:跳过 gifsicle/optipng 等原生编译(需 autoreconf;vite 未启用 imagemin)
|
||||||
RUN pnpm config set registry https://registry.npmmirror.com \
|
RUN pnpm config set registry https://registry.npmmirror.com \
|
||||||
&& pnpm install --frozen-lockfile
|
&& pnpm install --frozen-lockfile --ignore-scripts
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN pnpm run build
|
RUN pnpm run build
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user