-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathDockerfile
32 lines (21 loc) · 1.32 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
FROM nimmis/alpine-micro
MAINTAINER nimmis <[email protected]>
COPY root/. /
RUN apk update && apk upgrade && \
# Make info file about this build
printf "Build of nimmis/alpine-apache, date: %s\n" `date -u +"%Y-%m-%dT%H:%M:%SZ"` >> /etc/BUILD && \
apk add apache2 libxml2-dev apache2-utils && \
mkdir /web/ && chown -R apache.www-data /web && \
sed -i 's#^DocumentRoot ".*#DocumentRoot "/web/html"#g' /etc/apache2/httpd.conf && \
sed -i 's#AllowOverride [Nn]one#AllowOverride All#' /etc/apache2/httpd.conf && \
sed -i 's#^ServerRoot .*#ServerRoot /web#g' /etc/apache2/httpd.conf && \
sed -i 's/^#ServerName.*/ServerName webproxy/' /etc/apache2/httpd.conf && \
sed -i 's#^IncludeOptional /etc/apache2/conf#IncludeOptional /web/config/conf#g' /etc/apache2/httpd.conf && \
sed -i 's#PidFile "/run/.*#Pidfile "/web/run/httpd.pid"#g' /etc/apache2/conf.d/mpm.conf && \
sed -i 's#Directory "/var/www/localhost/htdocs.*#Directory "/web/html" >#g' /etc/apache2/httpd.conf && \
sed -i 's#Directory "/var/www/localhost/cgi-bin.*#Directory "/web/cgi-bin" >#g' /etc/apache2/httpd.conf && \
sed -i 's#/var/log/apache2/#/web/logs/#g' /etc/logrotate.d/apache2 && \
sed -i 's/Options Indexes/Options /g' /etc/apache2/httpd.conf && \
rm -rf /var/cache/apk/*
VOLUME /web
EXPOSE 80 443