Skip to content

Commit d4d87fe

Browse files
authored
Update Dockerfile
1 parent 5b7d7c1 commit d4d87fe

File tree

1 file changed

+16
-17
lines changed

1 file changed

+16
-17
lines changed

Dockerfile

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
1-
FROM appsecpipeline/dojo-base
21

3-
#Create the dojo user
4-
RUN useradd -m dojo
2+
FROM ubuntu:16.04
3+
MAINTAINER Matt Tesauro <[email protected]<mailto:[email protected]>>
54

6-
#Change to the dojo user
7-
USER dojo
5+
# Create a single Docker running DefectDojo and all dependencies
86

9-
#Add DefectDojo
10-
ADD . /django-DefectDojo
7+
RUN apt update \
8+
&& DEBIAN_FRONTEND=noninteractive apt install -y mysql-server sudo git expect \
9+
&& usermod -d /var/lib/mysql/ mysql \
10+
&& service mysql start \
11+
&& cd /opt \
12+
&& git clone https://github.com/OWASP/django-DefectDojo.git \
13+
&& export AUTO_DOCKER=yes \
14+
&& /opt/django-DefectDojo/setup.bash \
15+
&& service mysql stop
1116

12-
#Set working directory
13-
WORKDIR /django-DefectDojo
17+
WORKDIR /opt/django-DefectDojo
1418

15-
USER root
16-
17-
#Run the setup script
18-
RUN bash docker/docker-startup.bash setup
19-
20-
USER dojo
21-
22-
CMD bash docker/docker-startup.bash
19+
CMD chown -R mysql:mysql /var/lib/mysql /var/run/mysqld \
20+
&& service mysql start \
21+
&& python manage.py runserver 0.0.0.0:8000<http://0.0.0.0:8000>

0 commit comments

Comments
 (0)