forked from giveen/pentestagent
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.kali
More file actions
85 lines (72 loc) · 2.03 KB
/
Dockerfile.kali
File metadata and controls
85 lines (72 loc) · 2.03 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
85
# PentestAgent Kali Linux Image
# Full penetration testing environment
FROM kalilinux/kali-rolling
LABEL maintainer="Masic"
LABEL description="PentestAgent with Kali Linux tools"
# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# Update and install Kali tools
RUN apt-get update && apt-get install -y --no-install-recommends \
# Python (python3-full includes venv with ensurepip)
python3-full \
python3-pip \
# Kali meta-packages (selective for size)
kali-tools-web \
kali-tools-information-gathering \
kali-tools-vulnerability \
kali-tools-exploitation \
# Additional tools
nmap \
nikto \
dirb \
gobuster \
sqlmap \
wpscan \
hydra \
john \
hashcat \
metasploit-framework \
burpsuite \
zaproxy \
nuclei \
ffuf \
# Network tools
openvpn \
wireguard \
proxychains4 \
tor \
# Utilities
curl \
wget \
git \
vim \
tmux \
jq \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Create app directory
WORKDIR /app
# Install Python dependencies using virtual environment (PEP 668 compliance)
COPY requirements.txt .
RUN python3 -m venv /opt/venv && \
/opt/venv/bin/pip install --no-cache-dir --upgrade pip wheel setuptools
# Install heavy dependencies first (helps with CI memory limits)
RUN /opt/venv/bin/pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu
RUN /opt/venv/bin/pip install --no-cache-dir sentence-transformers faiss-cpu
RUN /opt/venv/bin/pip install --no-cache-dir -r requirements.txt
# Add venv to PATH
ENV PATH="/opt/venv/bin:$PATH"
# Copy application code
COPY . .
# Copy common wordlists
RUN mkdir -p /wordlists && \
cp -r /usr/share/wordlists/* /wordlists/ 2>/dev/null || true
# Set permissions
RUN chmod +x /app/scripts/*.sh 2>/dev/null || true
# Entry point
COPY docker-entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["python3", "-m", "pentestagent"]