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
32
43# Create app directory
54WORKDIR /app
@@ -16,12 +15,21 @@ COPY . .
1615# Build the application
1716RUN npm run build
1817
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
1931ENV LEETCODE_SITE=global \
2032 LEETCODE_SESSION=
2133
22- # Expose any port if needed (MCP uses stdio, so not required for now)
23-
2434# 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