-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.worker
executable file
·106 lines (74 loc) · 2.54 KB
/
Dockerfile.worker
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
## Builder stage
FROM golang:1.23-bullseye AS builder
WORKDIR /app
RUN apt-get update && apt-get install -y \
git \
make \
gcc \
wget \
build-essential \
&& rm -rf /var/lib/apt/lists/*
ENV CGO_ENABLED=1
ENV GOBIN=/usr/local/go/bin
# Install pdtm and tools with specific architecture handling
RUN go install -v github.com/projectdiscovery/pdtm/cmd/pdtm@latest && \
pdtm -i subfinder && \
pdtm -i httpx && \
pdtm -i dnsx && \
pdtm -i nuclei
RUN go install github.com/Josue87/gotator@latest
RUN go install -v github.com/owasp-amass/amass/v4/...@master
RUN go install -v github.com/sensepost/gowitness@latest
RUN go install github.com/ffuf/ffuf/v2@latest
RUN cd /tmp && git clone https://github.com/blechschmidt/massdns --tag v1.1.0 && \
cd /tmp/v1.1.0 && \
make && \
mv /tmp/v1.1.0/bin/massdns /usr/local/bin/massdns
RUN go install github.com/d3mondev/puredns/v2@latest
RUN go install github.com/lc/gau/v2/cmd/gau@latest
RUN go install github.com/tomnomnom/unfurl@latest
RUN go install github.com/tomnomnom/assetfinder@latest
## Final stage
FROM python:3.12-slim
WORKDIR /app
RUN apt-get update && apt-get install -y \
git \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y \
jq \
prips \
nmap \
wget \
chromium \
chromium-sandbox \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
ENV CGO_ENABLED=1
ENV GOBIN=/usr/local/bin
RUN ARCH=$(dpkg --print-architecture) && \
case ${ARCH} in \
amd64) GOARCH="amd64" ;; \
arm64) GOARCH="arm64" ;; \
*) echo "Unsupported architecture: ${ARCH}" && exit 1 ;; \
esac && \
wget "https://go.dev/dl/go1.23.4.linux-${GOARCH}.tar.gz" -O /tmp/go.tar.gz && \
tar -C /usr/local -xzf /tmp/go.tar.gz && \
rm /tmp/go.tar.gz
ENV PATH="$PATH:/usr/local/go/bin"
RUN git clone https://github.com/UnaPibaGeek/ctfr.git /opt/ctfr && \
cd /opt/ctfr && \
pip install -r requirements.txt
# Copy binaries from builder stage
COPY --from=builder /usr/local/go/bin/* /usr/local/bin/
COPY --from=builder /root/.pdtm/go/bin/* /usr/local/bin/
COPY --from=builder /usr/local/bin/massdns /usr/local/bin/massdns
# Copy recon worker files
COPY ./docker/worker/* /app/Worker/files/
COPY ./src/h3xrecon/__about__.py /app/
COPY ./dist/h3xrecon-*.whl /app/
RUN python3 -m venv /app/venv && \
/app/venv/bin/pip install --upgrade pip && \
/app/venv/bin/pip install /app/h3xrecon-*-py3-none-any.whl
ENV PYTHONUNBUFFERED=1
ENV PYTHONFAULTHANDLER=1
ENTRYPOINT ["/app/venv/bin/h3xrecon-recon"]