diff options
Diffstat (limited to 'lighttpd-static')
-rw-r--r-- | lighttpd-static/Dockerfile | 15 | ||||
-rwxr-xr-x | lighttpd-static/docker-build-image | 4 | ||||
-rw-r--r-- | lighttpd-static/lighttpd.conf | 31 |
3 files changed, 50 insertions, 0 deletions
diff --git a/lighttpd-static/Dockerfile b/lighttpd-static/Dockerfile new file mode 100644 index 0000000..3a1c084 --- /dev/null +++ b/lighttpd-static/Dockerfile @@ -0,0 +1,15 @@ +FROM gliderlabs/alpine:3.1 +MAINTAINER Clark Laughlin <clark.laughlin@linaro.org> + +RUN apk add --update \ + lighttpd \ + && rm -rf /var/cache/apk/* + +ADD lighttpd.conf /etc/lighttpd/lighttpd.conf +RUN adduser www-data -G www-data -H -s /bin/false -D + +EXPOSE 8080 +VOLUME /var/www + +ENTRYPOINT ["lighttpd", "-D", "-f", "/etc/lighttpd/lighttpd.conf"] + diff --git a/lighttpd-static/docker-build-image b/lighttpd-static/docker-build-image new file mode 100755 index 0000000..32b9fd4 --- /dev/null +++ b/lighttpd-static/docker-build-image @@ -0,0 +1,4 @@ +#!/bin/bash +docker rmi lighttpd-static +docker build -t lighttpd-static . + diff --git a/lighttpd-static/lighttpd.conf b/lighttpd-static/lighttpd.conf new file mode 100644 index 0000000..e4af16f --- /dev/null +++ b/lighttpd-static/lighttpd.conf @@ -0,0 +1,31 @@ +# See /usr/share/doc/lighttpd + +server.port = 8080 +server.username = "www-data" +server.groupname = "www-data" +server.document-root = "/var/www" +server.errorlog = "/dev/stdout" +server.modules += ( "mod_setenv" ) +dir-listing.activate = "enable" +index-file.names = ( "index.html" ) +mimetype.assign = ( + ".html" => "text/html", + ".txt" => "text/plain", + ".log" => "text/plain", + ".json" => "text/plain", + ".css" => "text/css", + ".js" => "application/x-javascript", + ".jpg" => "image/jpeg", + ".jpeg" => "image/jpeg", + ".gif" => "image/gif", + ".png" => "image/png", + ".gz" => "text/plain", + "" => "application/octet-stream" + ) + +$HTTP["url"] =~ "\.gz$" { + setenv.add-response-header = ( "Content-Encoding" => "x-gzip" ) + compress.filetype = () + mimetype.assign = ("" => "text/plain") +} + |