Skip to content

Commit 9122fb7

Browse files
authored
Merge pull request #1 from ollytheninja/master
add slimmer docker files
2 parents db96d63 + 1a904b5 commit 9122fb7

File tree

5 files changed

+159
-0
lines changed

5 files changed

+159
-0
lines changed

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.github
2+
.git

docker/Dockerfile.alpine

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# WebMap
2+
# -
3+
# https://github.com/SECUREFOREST/WebMap
4+
# Author: SECUREFOREST, Original version - theMiddle
5+
# -
6+
# Usage:
7+
# $ cd /opt
8+
# $ git clone https://github.com/SECUREFOREST/WebMap.git
9+
# $ cd WebMap/docker
10+
# $ docker build -t webmap:latest .
11+
# $ docker run -d -v /opt/WebMap/docker/xml:/opt/xml -p 8000:8000 webmap:latest
12+
#
13+
# Nmap Example:
14+
# $ nmap -sT -A -oX /tmp/myscan.xml 192.168.1.0/24
15+
# $ mv /tmp/myscan.xml /opt/WebMap/docker/xml
16+
#
17+
# Now you can point your browser to http://localhost:8000
18+
19+
# FROM python:latest
20+
FROM python:3.7-alpine
21+
22+
ENV DEBIAN_FRONTEND noninteractive
23+
24+
WORKDIR /opt/
25+
26+
RUN apk update && apk add curl wget git wkhtmltopdf libssl1.1 vim nmap tzdata unzip xz
27+
28+
RUN mkdir xml notes && \
29+
wget -P . https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz && \
30+
tar -xvf wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
31+
32+
# copy requirements.txt first
33+
RUN pip3 install Django requests xmltodict
34+
RUN django-admin startproject nmapdashboard
35+
WORKDIR /opt/nmapdashboard
36+
RUN git clone https://github.com/SECUREFOREST/WebMap.git nmapreport && rm -rf nmapreport/.git
37+
38+
COPY settings.py /opt/nmapdashboard/nmapdashboard/
39+
COPY urls.py /opt/nmapdashboard/nmapdashboard/
40+
# COPY vimrc /root/.vimrc
41+
COPY tzdata.sh /root/tzdata.sh
42+
COPY startup.sh startup.sh
43+
44+
WORKDIR /opt/nmapdashboard
45+
RUN python3 manage.py migrate
46+
# RUN apt-get autoremove -y
47+
RUN ln -s /opt/nmapdashboard/nmapreport/token.py /root/token
48+
RUN chmod +x /root/token
49+
50+
EXPOSE 8000
51+
52+
ENTRYPOINT ["bash", "/startup.sh"]

docker/Dockerfile.python

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# WebMap
2+
# -
3+
# https://github.com/SECUREFOREST/WebMap
4+
# Author: SECUREFOREST, Original version - theMiddle
5+
# -
6+
# Usage:
7+
# $ cd /opt
8+
# $ git clone https://github.com/SECUREFOREST/WebMap.git
9+
# $ cd WebMap/docker
10+
# $ docker build -t webmap:latest .
11+
# $ docker run -d -v /opt/WebMap/docker/xml:/opt/xml -p 8000:8000 webmap:latest
12+
#
13+
# Nmap Example:
14+
# $ nmap -sT -A -oX /tmp/myscan.xml 192.168.1.0/24
15+
# $ mv /tmp/myscan.xml /opt/WebMap/docker/xml
16+
#
17+
# Now you can point your browser to http://localhost:8000
18+
19+
FROM python:3.7-slim
20+
21+
ENV DEBIAN_FRONTEND noninteractive
22+
23+
WORKDIR /opt/
24+
25+
RUN apt-get update && apt-get install -y \
26+
curl wget git wkhtmltopdf libssl1.1 vim nmap tzdata unzip xz-utils
27+
28+
RUN mkdir xml notes && \
29+
wget -P . https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz && \
30+
tar -xvf wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
31+
32+
# copy requirements.txt first
33+
RUN pip3 install Django requests xmltodict
34+
RUN django-admin startproject nmapdashboard
35+
WORKDIR /opt/nmapdashboard
36+
RUN git clone https://github.com/SECUREFOREST/WebMap.git nmapreport && rm -rf nmapreport/.git
37+
38+
COPY settings.py /opt/nmapdashboard/nmapdashboard/
39+
COPY urls.py /opt/nmapdashboard/nmapdashboard/
40+
# COPY vimrc /root/.vimrc
41+
COPY tzdata.sh /root/tzdata.sh
42+
COPY startup.sh startup.sh
43+
44+
WORKDIR /opt/nmapdashboard
45+
RUN python3 manage.py migrate
46+
RUN apt-get autoremove -y
47+
RUN ln -s /opt/nmapdashboard/nmapreport/token.py /root/token
48+
RUN chmod +x /root/token
49+
50+
EXPOSE 8000
51+
52+
ENTRYPOINT ["bash", "/startup.sh"]

docker/Dockerfile.python-slim

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# WebMap
2+
# -
3+
# https://github.com/SECUREFOREST/WebMap
4+
# Author: SECUREFOREST, Original version - theMiddle
5+
# -
6+
# Usage:
7+
# $ cd /opt
8+
# $ git clone https://github.com/SECUREFOREST/WebMap.git
9+
# $ cd WebMap/docker
10+
# $ docker build -t webmap:latest .
11+
# $ docker run -d -v /opt/WebMap/docker/xml:/opt/xml -p 8000:8000 webmap:latest
12+
#
13+
# Nmap Example:
14+
# $ nmap -sT -A -oX /tmp/myscan.xml 192.168.1.0/24
15+
# $ mv /tmp/myscan.xml /opt/WebMap/docker/xml
16+
#
17+
# Now you can point your browser to http://localhost:8000
18+
19+
FROM python:3.7-slim
20+
21+
ENV DEBIAN_FRONTEND noninteractive
22+
23+
WORKDIR /opt/
24+
25+
RUN apt-get update && apt-get install -y \
26+
curl wget git wkhtmltopdf libssl1.1 vim nmap tzdata unzip xz-utils
27+
28+
RUN mkdir xml notes && \
29+
wget -P . https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz && \
30+
tar -xvf wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
31+
32+
# copy requirements.txt first
33+
RUN pip3 install Django requests xmltodict
34+
RUN django-admin startproject nmapdashboard
35+
WORKDIR /opt/nmapdashboard
36+
RUN git clone https://github.com/SECUREFOREST/WebMap.git nmapreport && rm -rf nmapreport/.git
37+
38+
COPY settings.py /opt/nmapdashboard/nmapdashboard/
39+
COPY urls.py /opt/nmapdashboard/nmapdashboard/
40+
# COPY vimrc /root/.vimrc
41+
COPY tzdata.sh /root/tzdata.sh
42+
COPY startup.sh startup.sh
43+
44+
WORKDIR /opt/nmapdashboard
45+
RUN python3 manage.py migrate
46+
RUN apt-get autoremove -y
47+
RUN ln -s /opt/nmapdashboard/nmapreport/token.py /root/token
48+
RUN chmod +x /root/token
49+
50+
EXPOSE 8000
51+
52+
ENTRYPOINT ["bash", "/startup.sh"]

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
requests
22
xmltodict
33
python-nmap
4+
Django

0 commit comments

Comments
 (0)