File tree Expand file tree Collapse file tree 1 file changed +15
-7
lines changed Expand file tree Collapse file tree 1 file changed +15
-7
lines changed Original file line number Diff line number Diff line change 1
- # Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
2
- FROM node:lts-alpine
1
+ FROM node:20-alpine AS builder
3
2
4
3
# Create app directory
5
4
WORKDIR /app
@@ -16,12 +15,21 @@ COPY . .
16
15
# Build the application
17
16
RUN npm run build
18
17
18
+ # Use Node.js 20 Alpine as the base image for the runtime stage
19
+ FROM node:20-alpine AS runner
20
+
21
+ # Set the working directory for the runtime stage
22
+ WORKDIR /app
23
+
24
+ # Copy the built application and dependencies from the builder stage
25
+ COPY --from=builder /app/package*.json ./
26
+ COPY --from=builder /app/build ./build
27
+
28
+ RUN npm install --ignore-scripts --omit=dev
29
+
30
+ # Define environment variables
19
31
ENV LEETCODE_SITE=global \
20
32
LEETCODE_SESSION=
21
33
22
- # Expose any port if needed (MCP uses stdio, so not required for now)
23
-
24
34
# Set the default command
25
- CMD node build/index.js \
26
- --site ${LEETCODE_SITE:-global} \
27
- --session ${LEETCODE_SESSION}
35
+ ENTRYPOINT ["node" ,"build/index.js" ]
You can’t perform that action at this time.
0 commit comments