forked from archerysec/archerysec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
57 lines (45 loc) · 1.2 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
53
54
55
56
57
#Ubuntu base OS
FROM ubuntu:18.04
LABEL MAINTAINER="Anand Tiwari"
ENV DJANGO_SETTINGS_MODULE=archerysecurity.settings.base
# Update & Upgrade Ubuntu. Install packages
RUN \
apt-get update && \
DEBIAN_FRONTEND=noninteractive \
apt-get install --quiet --yes --fix-missing \
make \
postgresql-client-10 \
sslscan \
nikto \
nmap \
python \
wget \
curl \
unzip \
git \
python-pip \
&& \
DEBIAN_FRONTEND=noninteractive \
apt-get autoremove --purge -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Create archerysec user and group
RUN groupadd -r archerysec && useradd -r -m -g archerysec archerysec
# Set user to archerysec to execute rest of commands
USER archerysec
# Create archerysec folder.
RUN mkdir /home/archerysec/app
# Set archerysec as a work directory.
WORKDIR /home/archerysec/app
# Copy all file to archerysec folder.
COPY . .
RUN mkdir nikto_result
# Install requirements
RUN pip install --no-cache-dir -r requirements.txt && \
rm -rf /home/archerysec/.cache
# Exposing port.
EXPOSE 8000
# Include init script
ADD ./docker-files/init.sh /usr/local/bin/init.sh
# UP & RUN application.
CMD ["/usr/local/bin/init.sh"]