summaryrefslogtreecommitdiff
path: root/docker/tbp/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'docker/tbp/Dockerfile')
-rw-r--r--docker/tbp/Dockerfile34
1 files changed, 34 insertions, 0 deletions
diff --git a/docker/tbp/Dockerfile b/docker/tbp/Dockerfile
new file mode 100644
index 0000000..5b47402
--- /dev/null
+++ b/docker/tbp/Dockerfile
@@ -0,0 +1,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"]