-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
84 lines (68 loc) · 2.01 KB
/
Dockerfile
File metadata and controls
84 lines (68 loc) · 2.01 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Worker-Focused OSINT MCP Server
# Optimized Kali Linux container with OSINT tools
FROM kalilinux/kali-rolling:latest
# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONUNBUFFERED=1
# Update and install system dependencies
RUN apt-get update && apt-get install -y \
# Core utilities
python3 \
python3-pip \
python3-venv \
git \
curl \
wget \
# OSINT tools
whois \
dnsutils \
nmap \
exiftool \
netcat-traditional \
theharvester \
# Image processing
imagemagick \
# OPSEC - Tor for anonymization (Phase 2)
tor \
# Additional useful tools
jq \
vim \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Create working directory
WORKDIR /app
# Copy requirements first for better caching
COPY requirements.txt .
# Install Python dependencies
# Use --ignore-installed to override system packages
RUN pip3 install --break-system-packages --no-cache-dir --ignore-installed -r requirements.txt
# Copy application files
COPY osint_server.py .
COPY opsec_config.py .
COPY opsec_requests.py .
COPY tor_manager.py .
COPY config.yaml* ./
# Copy tools directory with Phase 1 implementations
COPY tools/ ./tools/
# Configure Tor
RUN mkdir -p /var/lib/tor && \
chown -R debian-tor:debian-tor /var/lib/tor && \
chmod 700 /var/lib/tor
# Copy Tor configuration
COPY torrc /etc/tor/torrc
# Create directories for results and logs
RUN mkdir -p /app/results /app/logs
# Set up non-root user (security best practice)
RUN useradd -m -u 1000 osint && \
chown -R osint:osint /app
# Switch to non-root user
USER osint
# Expose MCP server (not a network port, just documentation)
# MCP uses stdio, so no actual port exposure needed
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD python3 -c "import sys; sys.exit(0)"
# Start Tor and then run the MCP server
# Temporarily disabled Tor auto-start for debugging
# CMD service tor start && python3 /app/osint_server.py
CMD python3 /app/osint_server.py