Skip to content

Commit

Permalink
Merge branch 'docker-cleanup' into release/2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
yogeshojha committed Jun 19, 2024
2 parents ab674e9 + a9bc2a2 commit 1748aa9
Showing 1 changed file with 33 additions and 44 deletions.
77 changes: 33 additions & 44 deletions web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,14 @@ ENV GOPATH=$HOME/go
ENV PATH="${PATH}:${GOROOT}/bin:${GOPATH}/bin"

# Install Python
RUN apt update -y && \
apt update -y && \
RUN apt update && \
apt install -y \
python3.10 \
python3-dev \
python3-pip

# Install essential packages
RUN apt install -y --no-install-recommends \
RUN apt install -y --no-install-recommends \
build-essential \
cmake \
geoip-bin \
Expand All @@ -48,16 +47,14 @@ RUN apt install -y --no-install-recommends \
RUN add-apt-repository ppa:mozillateam/ppa

# Download and install go 1.20
RUN wget https://golang.org/dl/go1.21.4.linux-amd64.tar.gz
RUN tar -xvf go1.21.4.linux-amd64.tar.gz
RUN rm go1.21.4.linux-amd64.tar.gz
RUN mv go /usr/local
RUN wget https://golang.org/dl/go1.21.4.linux-amd64.tar.gz && \
tar -xvf go1.21.4.linux-amd64.tar.gz -C /usr/local/ && \
rm go1.21.4.linux-amd64.tar.gz

# Download geckodriver
RUN wget https://github.com/mozilla/geckodriver/releases/download/v0.32.0/geckodriver-v0.32.0-linux64.tar.gz
RUN tar -xvf geckodriver-v0.32.0-linux64.tar.gz
RUN rm geckodriver-v0.32.0-linux64.tar.gz
RUN mv geckodriver /usr/bin
RUN wget https://github.com/mozilla/geckodriver/releases/download/v0.32.0/geckodriver-v0.32.0-linux64.tar.gz && \
tar -xvf geckodriver-v0.32.0-linux64.tar.gz -C /usr/bin/ && \
rm geckodriver-v0.32.0-linux64.tar.gz

# Make directory for app
WORKDIR /usr/src/app
Expand All @@ -67,51 +64,43 @@ ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1

# Download Go packages
RUN go install -v github.com/jaeles-project/gospider@latest
RUN go install -v github.com/tomnomnom/gf@latest
RUN go install -v github.com/tomnomnom/unfurl@latest
RUN go install -v github.com/tomnomnom/waybackurls@latest
RUN go install -v github.com/projectdiscovery/httpx/cmd/httpx@latest
RUN go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest
RUN go install -v github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest
RUN go install -v github.com/projectdiscovery/naabu/v2/cmd/naabu@latest
RUN go install -v github.com/hakluke/hakrawler@latest
RUN go install -v github.com/lc/gau/v2/cmd/gau@latest
RUN go install -v github.com/owasp-amass/amass/v3/...@latest
RUN go install -v github.com/ffuf/ffuf@latest
RUN go install -v github.com/projectdiscovery/tlsx/cmd/tlsx@latest
RUN go install -v github.com/hahwul/dalfox/v2@latest
RUN go install -v github.com/projectdiscovery/katana/cmd/katana@latest
RUN go install -v github.com/dwisiswant0/crlfuzz/cmd/crlfuzz@latest
RUN go install -v github.com/sa7mon/s3scanner@latest
ENV GO111MODULE=on
RUN printf "\
github.com/jaeles-project/gospider@latest\n\
github.com/tomnomnom/gf@latest\n\
github.com/tomnomnom/unfurl@latest\n\
github.com/tomnomnom/waybackurls@latest\n\
github.com/projectdiscovery/httpx/cmd/httpx@latest\n\
github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest\n\
github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest\n\
github.com/projectdiscovery/naabu/v2/cmd/naabu@latest\n\
github.com/hakluke/hakrawler@latest\n\
github.com/lc/gau/v2/cmd/gau@latest\n\
github.com/jaeles-project/gospider@latest\n\
github.com/owasp-amass/amass/v3/...@latest\n\
github.com/ffuf/ffuf@latest\n\
github.com/projectdiscovery/tlsx/cmd/tlsx@latest\n\
github.com/hahwul/dalfox/v2@latest\n\
github.com/projectdiscovery/katana/cmd/katana@latest\n\
github.com/dwisiswant0/crlfuzz/cmd/crlfuzz@latest\n\
github.com/sa7mon/s3scanner@latest\n" | \
xargs -L1 go install -ldflags="-s -w" -v && \
rm -rf /go/pkg/* && rm -rf /root/.cache/go-build

# Update Nuclei and Nuclei-Templates
RUN nuclei -update
RUN nuclei -update-templates

# Update project discovery tools
RUN httpx -up
RUN naabu -up
RUN subfinder -up
RUN tlsx -up
RUN katana -up

# Copy requirements
COPY ./requirements.txt /tmp/requirements.txt
RUN pip3 install --upgrade setuptools pip && \
pip3 install -r /tmp/requirements.txt

pip3 install -r /tmp/requirements.txt --no-cache-dir

# install eyewitness

RUN python3 -m pip install fuzzywuzzy \
RUN python3 -m pip install --no-cache-dir fuzzywuzzy \
selenium==4.9.1 \
python-Levenshtein \
pyvirtualdisplay \
netaddr

# Copy source code
COPY . /usr/src/app/

# httpx seems to have issue, use alias instead!!!
RUN echo 'alias httpx="/go/bin/httpx"' >> ~/.bashrc
COPY . /usr/src/app/

0 comments on commit 1748aa9

Please sign in to comment.