forked from cmutzel/all-in-one-hackazon
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
executable file
·48 lines (40 loc) · 1.51 KB
/
Dockerfile
File metadata and controls
executable file
·48 lines (40 loc) · 1.51 KB
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
FROM ubuntu:14.04 AS builder
RUN apt update && apt install -y unzip
ADD https://github.com/rapid7/hackazon/archive/master.zip /hackazon-master.zip
RUN unzip /hackazon-master.zip -d hackazon
FROM ubuntu:14.04
RUN apt update \
&& DEBIAN_FRONTEND=noninteractive apt -y --no-install-recommends install \
apache2 \
libapache2-mod-php5 \
mysql-client \
mysql-server \
php5-cli \
php5-ldap \
php5-mysql \
python-setuptools \
python3-pip \
pwgen \
vim-tiny \
&& pip3 install supervisor==4.3.0 \
&& rm -rf /var/lib/apt/lists/*
# setup hackazon
RUN rm -rf /var/www/*
COPY --from=builder /hackazon/hackazon-master/ /var/www/hackazon
RUN cp /var/www/hackazon/assets/config/db.sample.php /var/www/hackazon/assets/config/db.php
RUN cp /var/www/hackazon/assets/config/email.sample.php /var/www/hackazon/assets/config/email.php
ADD ./configs/supervisord.conf /etc/supervisord.conf
ADD ./configs/000-default.conf /etc/apache2/sites-available/000-default.conf
ADD ./configs/parameters.php /var/www/hackazon/assets/config/parameters.php
ADD ./configs/rest.php /var/www/hackazon/assets/config/rest.php
ADD ./configs/createdb.sql /var/www/hackazon/database/createdb.sql
ADD ./scripts/start.sh /start.sh
ADD ./scripts/passwordHash.php /passwordHash.php
ADD ./scripts/foreground.sh /etc/apache2/foreground.sh
RUN chown -R www-data:www-data /var/www/
RUN chmod 755 /start.sh
RUN chmod 755 /etc/apache2/foreground.sh
RUN a2enmod rewrite
RUN mkdir -p /var/log/supervisor/
EXPOSE 80
CMD ["/bin/bash", "/start.sh"]