-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (23 loc) · 837 Bytes
/
Dockerfile
File metadata and controls
33 lines (23 loc) · 837 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
# Use Node.js 18 Alpine for smaller image size
FROM node:18-alpine
# Set working directory
WORKDIR /app
# Create logs directory
RUN mkdir -p logs
# Copy package files first for better caching
COPY package*.json ./
# Copy TypeScript configuration and source code
COPY tsconfig.json ./
COPY src/ ./src/
# Install all dependencies (including dev dependencies for build)
RUN npm ci
# Build the project (compiles TypeScript and sets executable permissions)
RUN npm run build
# Remove dev dependencies to reduce image size
RUN npm prune --omit=dev && npm cache clean --force
# Ensure the built file is executable
RUN chmod +x build/index.js
# Expose stdio for MCP communication
# Note: MCP servers typically communicate via stdio, not network ports
# Set the entrypoint to the built application
ENTRYPOINT ["node", "build/index.js"]