-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
52 lines (40 loc) · 1.13 KB
/
Dockerfile
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
FROM node:8
# Update and upgrade
RUN apt-get update -y
RUN apt-get upgrade -y
# Create app directory
WORKDIR /usr/src/app
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./
# If you are building your code for production
# RUN npm install --only=production
RUN npm install --only=production
RUN npm install joi --only=production
RUN npm install express --only=production
# Install nmap
RUN apt-get install nmap -y
# Add custom scripts
RUN git clone https://github.com/vulnersCom/nmap-vulners.git
WORKDIR /usr/src/app/nmap-vulners
RUN cp vulners.nse /usr/share/nmap/scripts/
WORKDIR /usr/src/app
# Install masscan
RUN git clone https://github.com/robertdavidgraham/masscan
WORKDIR /usr/src/app/masscan/
RUN make -j
WORKDIR /usr/src/app
# Install pip and install required python module
RUN apt-get install python-pip -y
RUN pip install xmltodict
# Open port
ENV PORT 3000
EXPOSE ${PORT}
# Bundle app source
COPY . .
# Make scripts executable
RUN chmod +x nmap/scan.sh
RUN chmod +x masscan/scan.sh
# Start the json-server
CMD [ "npm", "start" ]