-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
39 lines (28 loc) · 1.11 KB
/
Dockerfile
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
34
35
36
37
38
39
# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
# Start from the official Node.js image with the desired version
FROM node:18-alpine AS builder
# Set the working directory inside the Docker image
WORKDIR /app
# Copy the package.json and package-lock.json to the working directory
COPY package*.json ./
# Install dependencies
RUN npm install
# Copy the source code to the working directory
COPY ./src ./src
COPY tsconfig.json ./
# Run the build command to compile TypeScript to JavaScript
RUN npm run build
# Now create the production image, based on a smaller image
FROM node:18-alpine
# Set the working directory inside the Docker image
WORKDIR /app
# Copy the compiled JavaScript files from the builder stage
COPY --from=builder /app/build /app/build
COPY --from=builder /app/package.json /app/package.json
COPY --from=builder /app/package-lock.json /app/package-lock.json
# Install only production dependencies
RUN npm ci --omit=dev
# Set environment variable for Shodan API Key
ENV SHODAN_API_KEY=your-shodan-api-key
# Command to run the MCP server
ENTRYPOINT ["node", "build/index.js"]