Dockerfile: clone, build and install patched emdash source
This commit is contained in:
14
Dockerfile
14
Dockerfile
@@ -4,9 +4,6 @@ RUN apk add --no-cache python3 make g++ sqlite git
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Clone patched emdash source
|
|
||||||
RUN git clone --depth=1 https://git.moreminimore.com/kunthawat/emdash-patch-imageupload.git emdash-patch
|
|
||||||
|
|
||||||
COPY package.json pnpm-lock.yaml* ./
|
COPY package.json pnpm-lock.yaml* ./
|
||||||
RUN corepack enable && corepack prepare pnpm@9.0.0 --activate
|
RUN corepack enable && corepack prepare pnpm@9.0.0 --activate
|
||||||
RUN pnpm install
|
RUN pnpm install
|
||||||
@@ -15,12 +12,19 @@ FROM deps AS builder
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Copy patched emdash into node_modules
|
# Clone and build patched emdash source
|
||||||
COPY --from=deps /app/emdash-patch /app/node_modules/emdash
|
RUN git clone --depth=1 https://git.moreminimore.com/kunthawat/emdash-patch-imageupload.git emdash-source
|
||||||
|
WORKDIR /app/emdash-source
|
||||||
|
RUN pnpm install && pnpm build --filter @emdash-cms/core
|
||||||
|
|
||||||
|
# Return to app and copy source
|
||||||
|
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
|
||||||
|
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
|
||||||
|
|
||||||
FROM deps AS runner
|
FROM deps AS runner
|
||||||
|
|||||||
Reference in New Issue
Block a user