-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
46 lines (39 loc) · 1.18 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
FROM debian
## Install Base Packages
RUN apt-get update && apt-get -y install \
apache2 \
make \
curl \
git \
gcc
RUN a2enmod rewrite
RUN a2enmod cgid
RUN ln -sf /proc/self/fd/1 /var/log/apache2/access.log && \
ln -sf /proc/self/fd/1 /var/log/apache2/error.log && \
ln -sf /proc/self/fd/1 /var/log/apache2/other_vhosts_access.log
RUN echo '<VirtualHost *:80> \n\
ServerAdmin [email protected] \n\
DocumentRoot /var/www/html/ \n\
Options +ExecCGI \n\
DirectoryIndex web \n\
<FilesMatch "^[^\.]+$"> \n\
SetHandler cgi-script \n\
</FilesMatch> \n\
<Directory "/var/www/html/"> \n\
Options +ExecCGI \n\
<FilesMatch "^[^\.]+$"> \n\
SetHandler cgi-script \n\
</FilesMatch> \n\
<IfModule mod_rewrite.c> \n\
RewriteEngine On \n\
RewriteBase / \n\
RewriteRule ^web$ - [L] \n\
RewriteCond %{REQUEST_FILENAME} !-f \n\
RewriteCond %{REQUEST_FILENAME} !-d \n\
RewriteRule . /web [L] \n\
</IfModule> \n\
</Directory> \n\
</VirtualHost> \n\
' > /etc/apache2/sites-available/000-default.conf
EXPOSE 80
CMD /usr/sbin/apache2ctl -D FOREGROUND