Dockerfile: fix build filter to use 'emdash' package name

This commit is contained in:
Kunthawat Greethong
2026-05-03 11:09:24 +07:00
parent 7036f9ef42
commit 9df25848dd

View File

@@ -12,17 +12,21 @@ FROM deps AS builder
WORKDIR /app WORKDIR /app
# Clone and build patched emdash source # Clone patched emdash source
RUN git clone --depth=1 https://git.moreminimore.com/kunthawat/emdash-patch-imageupload.git emdash-source RUN git clone --depth=1 https://git.moreminimore.com/kunthawat/emdash-patch-imageupload.git emdash-source
WORKDIR /app/emdash-source WORKDIR /app/emdash-source
RUN pnpm install && pnpm build --filter @emdash-cms/core
# Build only the emdash package (it's named "emdash" not "@emdash-cms/core")
RUN corepack enable && corepack prepare pnpm@9.0.0 --activate
RUN pnpm install
RUN pnpm build --filter emdash
# Return to app and copy source # Return to app and copy source
WORKDIR /app WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules COPY --from=deps /app/node_modules ./node_modules
COPY . . COPY . .
# Replace emdash with built source using pnpm overrides # Replace emdash with built source
RUN rm -rf node_modules/emdash && cp -r /app/emdash-source/packages/core/dist node_modules/emdash RUN rm -rf node_modules/emdash && cp -r /app/emdash-source/packages/core/dist node_modules/emdash
RUN pnpm build && mkdir -p storage/uploads RUN pnpm build && mkdir -p storage/uploads