forked from ChiR24/Unreal_mcp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (26 loc) · 971 Bytes
/
Dockerfile
File metadata and controls
37 lines (26 loc) · 971 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Multi-stage build for efficient image size
FROM node:22-alpine AS builder
# Set working directory
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install ALL dependencies (including dev) for building - skip prepare script
RUN npm ci --ignore-scripts
# Copy TypeScript config, ESLint config, and source files
COPY tsconfig.json eslint.config.mjs ./
COPY src ./src
# Build the TypeScript project
RUN npm run build
# Production stage
FROM cgr.dev/chainguard/node:latest
ENV NODE_ENV=production
# Chainguard node runs as nonroot by default (user: node)
WORKDIR /app
# Copy only package manifests and install production deps in a clean layer
COPY --chown=node:node package*.json ./
RUN npm ci --omit=dev --ignore-scripts && npm cache clean --force
# Copy built application from builder stage
COPY --chown=node:node --from=builder /app/dist ./dist
# No shell, no init needed; run as provided nonroot user
ENTRYPOINT ["/usr/bin/node"]
CMD ["dist/cli.js"]