aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
blob: 151241d7d86d59eeb70533540edb5ce0750eb2f5 (plain)
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
FROM debian:9-slim

RUN apt-get update
RUN apt-get install -y curl
RUN apt-get install -y unzip
RUN apt-get install -y apache2
RUN apt-get install -y rsyslog
RUN apt-get install -y sqlite3
RUN apt-get install -y php
RUN apt-get install -y libapache2-mod-php
RUN apt-get install -y php-date
RUN apt-get install -y php-dompdf
RUN apt-get install -y php-mbstring
RUN apt-get install -y php-sqlite3
RUN apt-get install -y php-mysql
RUN apt-get install -y php-dom

WORKDIR /src
RUN curl -LO https://github.com/fruux/Baikal/releases/download/0.4.6/baikal-0.4.6.zip && unzip baikal-0.4.6.zip && rm -f baikal-0.4.6.zip
RUN rm -r baikal/Specific/*
RUN mkdir -p /var/www/
RUN mv /src/baikal/* /var/www/html/

VOLUME /var/www/html/Specific

WORKDIR /etc/apache2/sites-available
RUN /etc/init.d/apache2 stop ; a2enmod rewrite
RUN mv -f 000-default.conf ..
COPY resources/baikal.apache2 /etc/apache2/sites-available/000-default.conf
RUN echo "error_log = syslog" >> /etc/php/7.0/apache2/php.ini

WORKDIR /
COPY bin/runapache2 /

RUN awk '/vim: syntax/ { printf("# Poxy; CVE-2016-5387\nLoadModule headers_module /usr/lib/apache2/modules/mod_headers.so\nRequestHeader unset Proxy early\n%s\n", $0); next; } { print; }' /etc/apache2/apache2.conf > /tmp/apache2.conf
RUN cat /tmp/apache2.conf > /etc/apache2/apache2.conf && rm /tmp/apache2.conf

ENTRYPOINT [ "/runapache2" ]