Ensure pnpm manifests in Docker builds

This commit is contained in:
jeninh
2026-02-07 20:10:10 -05:00
parent 60e01d8207
commit c8e3b63cc5
2 changed files with 12 additions and 2 deletions

View File

@@ -16,6 +16,11 @@ FROM base AS installer
RUN apk update
RUN apk add --no-cache libc6-compat
WORKDIR /app
# Ensure pnpm has a root manifest even if the prune output is missing it.
COPY --from=builder /app/package.json ./package.json
COPY --from=builder /app/pnpm-workspace.yaml ./pnpm-workspace.yaml
COPY --from=builder /app/pnpm-lock.yaml ./pnpm-lock.yaml
# First install the dependencies
COPY --from=builder /app/out/json/ .
@@ -44,4 +49,4 @@ WORKDIR /app/apps/chat
EXPOSE 8000
ENTRYPOINT ["node", "dist/index.js"]
ENTRYPOINT ["node", "dist/index.js"]

View File

@@ -34,6 +34,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
COPY --from=builder /tmp/commit_hash /tmp/commit_hash
WORKDIR /app
# Ensure pnpm has a root manifest even if the prune output is missing it.
COPY --from=builder /app/package.json ./package.json
COPY --from=builder /app/pnpm-workspace.yaml ./pnpm-workspace.yaml
COPY --from=builder /app/pnpm-lock.yaml ./pnpm-lock.yaml
# First install the dependencies (as they change less often)
COPY --from=builder /app/out/json/ .
RUN pnpm install --frozen-lockfile
@@ -92,4 +97,4 @@ COPY --from=installer --chown=nextjs:nodejs /app/node_modules ./node_modules
COPY --from=installer --chown=nextjs:nodejs /app/package.json ./package.json
COPY --from=installer --chown=nextjs:nodejs /app/pnpm-workspace.yaml ./pnpm-workspace.yaml
CMD ["/usr/local/bin/start.sh"]
CMD ["/usr/local/bin/start.sh"]