forked from CooperCyberCoffee/opencti_mcp_server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (24 loc) · 785 Bytes
/
Dockerfile
File metadata and controls
34 lines (24 loc) · 785 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
FROM python:3.11-slim
LABEL maintainer="Matthew Hopkins <business@coopercybercoffee.com>"
LABEL description="Cooper Cyber Coffee OpenCTI MCP Server"
LABEL version="1.0.0"
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first for better caching
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy source code
COPY src/ ./src/
COPY main.py .
# Create non-root user
RUN useradd -r -s /bin/false mcp && \
chown -R mcp:mcp /app
USER mcp
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD curl -f http://localhost:8000/health || exit 1
EXPOSE 8000
CMD ["python", "main.py"]