fix: collab-server Dockerfile use multi-stage build for TypeScript
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,12 +1,21 @@
|
||||
FROM node:22-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json package-lock.json* ./
|
||||
RUN npm install
|
||||
|
||||
COPY . .
|
||||
RUN ./node_modules/.bin/tsc
|
||||
|
||||
FROM node:22-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json package-lock.json* ./
|
||||
RUN npm install --production
|
||||
RUN npm install --omit=dev
|
||||
|
||||
COPY . .
|
||||
RUN npx tsc
|
||||
COPY --from=builder /app/dist ./dist
|
||||
|
||||
EXPOSE 4000
|
||||
|
||||
|
||||
Reference in New Issue
Block a user