forked from romanchaa997/Audityzer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.mcp
More file actions
37 lines (26 loc) · 697 Bytes
/
Copy pathDockerfile.mcp
File metadata and controls
37 lines (26 loc) · 697 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
# MCP Server Dockerfile
FROM node:20-alpine
# Install dependencies
RUN apk add --no-cache curl
# Set working directory
WORKDIR /app
# Copy MCP server files
COPY package*.json ./
COPY src/mcp/ ./src/mcp/
COPY scripts/mcp-server.js ./scripts/
# Install dependencies
RUN npm ci --only=production
# Create non-root user
RUN addgroup -g 1001 -S mcp && \
adduser -S mcp -u 1001
# Change ownership
RUN chown -R mcp:mcp /app
# Switch to non-root user
USER mcp
# Expose MCP port
EXPOSE 8080
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD curl -f http://localhost:8080/health || exit 1
# Start MCP server
CMD ["node", "scripts/mcp-server.js"]