Skip to content

Commit 93869d3

Browse files
chore: create docker multistage build
1 parent 349a40c commit 93869d3

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

Dockerfile

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,29 @@
1-
FROM node:20-alpine
1+
FROM node:20-alpine AS builder
22

33
WORKDIR /app
44

55
COPY . .
66

7-
RUN npm install
7+
RUN npm ci
88

99
RUN npm run build
1010

11-
# Expose the port (only useful for remote mode)
12-
EXPOSE 3001
11+
FROM node:20-alpine AS server
12+
13+
WORKDIR /app
14+
15+
COPY --from=builder /app/package*.json .
16+
17+
COPY --from=builder /app/build ./build
1318

1419
ENV NODE_ENV=production
1520

21+
RUN npm ci --omit=dev
22+
23+
RUN npm i --omit=dev -g .
24+
25+
# Expose the port (only useful for remote mode)
26+
EXPOSE 3001
27+
1628
# Start the MCP server (by default using stdio)
17-
CMD ["node", "build/index.js"]
29+
CMD ["iexec-mcp"]

0 commit comments

Comments
 (0)