-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathnmap.dockerfile
More file actions
executable file
·36 lines (29 loc) · 832 Bytes
/
Copy pathnmap.dockerfile
File metadata and controls
executable file
·36 lines (29 loc) · 832 Bytes
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
#!/usr/bin/env -S docker build --compress -t pvtmert/nmap -f
ARG BASE=debian:9
FROM ${BASE} AS build
RUN apt update
RUN apt install -y autoconf automake \
build-essential clang make subversion ca-certificates python-dev \
libpcap-dev libpcre2-dev libpcre3-dev liblinear-dev liblua5.3-dev \
libz-dev libssh2-1-dev libssl-dev
WORKDIR /data
ENV CC clang
ENV DIR nmap
ENV REPO https://svn.nmap.org/nmap
RUN svn co $REPO $DIR
RUN (cd $DIR \
&& ./configure --without-zenmap \
LDFLAGS="-fPIC" \
CFLAGS=" -fPIC" \
&& make -j$(nproc) \
&& make -j$(nproc) install \
) || true
#ENV PATH="$PATH:$DIR"
#ENTRYPOINT [ "nmap" ]
#CMD [ "--help" ]
FROM ${BASE}
RUN apt update
RUN apt install -y libpcap0.8 libssh2-1 libssl1.1 liblinear3 liblua5.3
COPY --from=build /usr/local /usr/local
ENTRYPOINT [ "nmap" ]
CMD [ ]