-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathDockerfile.streamable-http
More file actions
41 lines (30 loc) · 895 Bytes
/
Dockerfile.streamable-http
File metadata and controls
41 lines (30 loc) · 895 Bytes
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
40
41
# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
## Stage 1: Builder
FROM node:lts-alpine AS builder
# Set working directory
WORKDIR /app
# Copy all files into the container
COPY . .
# Install dependencies without running scripts
RUN npm install --ignore-scripts
# Build the TypeScript source code
RUN npm run build
## Stage 2: Runtime
FROM node:lts-alpine
WORKDIR /app
# Install Python and other programming languages
RUN apk add --no-cache \
python3 \
go \
php \
ruby
# Copy only the necessary files from the builder stage
COPY --from=builder /app/dist ./dist
COPY package*.json ./
# Install only production dependencies
RUN npm install --production --ignore-scripts
# Use a non-root user for security (optional)
RUN adduser -D mcpuser
USER mcpuser
# Set the entrypoint command
CMD ["node", "./dist/cli.js", "--transport", "http"]