-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy pathDockerfile.dev
More file actions
46 lines (38 loc) · 2.48 KB
/
Copy pathDockerfile.dev
File metadata and controls
46 lines (38 loc) · 2.48 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
FROM debian:bookworm
ARG TARGETARCH
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Asia/Shanghai
ENV NODE_PATH=/usr/local/lib/node_modules
# 替换源为阿里云镜像 (Debian 源不区分 arm64/amd64 的域名,维护更简单)
RUN echo "deb http://mirrors.aliyun.com/debian/ bookworm main non-free contrib" > /etc/apt/sources.list && \
echo "deb http://mirrors.aliyun.com/debian-security/ bookworm-security main" >> /etc/apt/sources.list && \
echo "deb http://mirrors.aliyun.com/debian/ bookworm-updates main non-free contrib" >> /etc/apt/sources.list && \
apt-get update -o Acquire::Retries=10 && \
apt-get install -y --no-install-recommends \
wget unzip bzip2 git curl tzdata \
gcc g++ make automake autoconf libtool \
libffi-dev libssl-dev python3 python3-dev python3-pip python3-venv \
libxml2-dev libxslt1-dev zlib1g-dev \
ca-certificates libnss3 libatk-bridge2.0-0 libgtk-3-0 libx11-xcb1 \
libxcb-dri3-0 libxcomposite1 libxdamage1 libxrandr2 libgbm1 \
libasound2 libxshmfence1 libdrm2 libxkbcommon0 libatspi2.0-0 libcups2 \
fontconfig nodejs npm fonts-wqy-zenhei fonts-wqy-microhei chromium chromium-common
RUN npm config set registry https://registry.npmmirror.com/ && \
npm install -g puppeteer-core@10.4.0
# 编译 MassDNS
RUN cd /tmp && \
wget https://github.com/blechschmidt/massdns/archive/refs/tags/v1.1.0.tar.gz && \
tar xvf v1.1.0.tar.gz && cd massdns-1.1.0 && make -j$(nproc) && \
cp bin/massdns /usr/local/bin/massdns && chmod +x /usr/local/bin/massdns && \
cd /tmp && rm -rf massdns*
# 编译 Nmap
RUN cd /tmp && \
wget https://nmap.org/dist/nmap-7.95.tar.bz2 && \
bzip2 -cd nmap-7.95.tar.bz2 | tar xvf - && cd nmap-7.95 && \
./configure --without-zenmap && make && make install && cd /tmp && rm -rf nmap* && wget -O /usr/local/share/nmap/nmap-service-probes https://fastly.jsdelivr.net/gh/nmap/nmap@master/nmap-service-probes
# 下载 Nuclei
RUN ARCH=$(dpkg --print-architecture) && \
if [ "$ARCH" = "amd64" ]; then NUCLEI_ZIP="nuclei_3.11.0_linux_amd64.zip"; else NUCLEI_ZIP="nuclei_3.11.0_linux_arm64.zip"; fi && \
wget -t 10 "https://github.com/projectdiscovery/nuclei/releases/download/v3.11.0/$NUCLEI_ZIP" -O $NUCLEI_ZIP || wget -t 10 "https://gh-proxy.com/https://github.com/projectdiscovery/nuclei/releases/download/v3.11.0/$NUCLEI_ZIP" -O $NUCLEI_ZIP && \
unzip $NUCLEI_ZIP && mv nuclei /usr/local/bin/ && chmod +x /usr/local/bin/nuclei && /usr/local/bin/nuclei -update-templates || true
WORKDIR /code