blob: 5b47402dac112242437801e3cf98cc9e13615f50 (
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
|
# Dockerfile for lighttpd
FROM alpine
ENV TZ=America/Chicago
COPY bashlib-current.tar.gz /root
RUN apk add --update --no-cache \
bash \
lighttpd \
lighttpd-mod_auth \
tzdata \
&& cd /root \
&& tar zxvf bashlib-current.tar.gz \
&& cd bashlib-0.4 \
&& ./configure \
&& cp bashlib /usr/local/bin \
&& rm -rf /root/* \
&& mkdir -p /var/www/localhost/cgi-bin \
&& rm -rf /var/cache/apk/* \
&& cp /usr/share/zoneinfo/America/Chicago /etc/localtime
## workaround for bug preventing sync between VirtualBox and host
# http://serverfault.com/questions/240038/lighttpd-broken-when-serving-from-virtualbox-shared-folder
RUN echo server.network-backend = \"writev\" >> /etc/lighttpd/lighttpd.conf
COPY etc/lighttpd/* /etc/lighttpd/
EXPOSE 80
COPY visitlog/visitlog.sh /var/www/localhost/cgi-bin/visitlog.cgi
COPY visitlog/style.css /var/www/localhost/htdocs/
RUN chmod 555 /var/www/localhost/cgi-bin/visitlog.cgi
CMD ["lighttpd", "-D", "-f", "/etc/lighttpd/lighttpd.conf"]
|