Skip to content

Commit 8a54f66

Browse files
committed
update dockerfile
1 parent 8afc2ea commit 8a54f66

File tree

1 file changed

+24
-4
lines changed

1 file changed

+24
-4
lines changed

.smithery/Dockerfile

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,31 @@
1-
FROM node:22-alpine
1+
# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
2+
# ----- Build Stage -----
3+
FROM node:lts-alpine AS builder
4+
WORKDIR /app
5+
6+
# Copy package and configuration
7+
COPY ../package.json ../package-lock.json ../tsconfig.json ../tsconfig.build.json ./
8+
9+
# Copy source code
10+
COPY ../src ./src
211

12+
# Install dependencies and build
13+
RUN npm ci && npm run build
14+
15+
# ----- Production Stage -----
16+
FROM node:lts-alpine
317
WORKDIR /app
418

5-
COPY ../ .
19+
# Copy built artifacts
20+
COPY --from=builder /app/dist ./dist
21+
22+
# Copy package.json for production install
23+
COPY ../package.json package-lock.json ./
624

7-
RUN npm ci
25+
# Install only production dependencies
26+
RUN npm ci --production --ignore-scripts
827

9-
RUN npm run build
28+
# Expose no ports (stdio only)
1029

30+
# Default command
1131
CMD ["node", "dist/index.js"]

0 commit comments

Comments
 (0)