-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (21 loc) · 741 Bytes
/
Copy pathDockerfile
File metadata and controls
33 lines (21 loc) · 741 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
FROM node:20-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY tsconfig*.json ./
COPY src ./src
RUN npm run build
FROM node:20-alpine AS runtime
WORKDIR /app
ENV NODE_ENV=production
COPY package*.json ./
RUN npm ci --omit=dev && npm cache clean --force
COPY --from=build /app/dist ./dist
# Run as the unprivileged `node` user shipped with the base image (uid 1000)
# rather than root — limits blast radius if the process is compromised.
USER node
# Streamable HTTP transport port (only used when MCP_TRANSPORT=http).
# Stdio transport (the default) ignores this. When running HTTP in a container,
# also set MCP_HTTP_HOST=0.0.0.0 and publish the port (-p 3000:3000).
EXPOSE 3000
CMD ["node", "dist/server.js"]