# HG changeset patch # User Chaiwat Suttipongsakul # Date 1646897194 -25200 # Thu Mar 10 14:26:34 2022 +0700 # Node ID 7d101f7da9eec21a5e27ca9273b9658c94f965d8 # Parent 6094793bafc130fea527542670a58606d6769800 Initial version diff --git a/Dockerfile b/Dockerfile new file mode 100644 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,26 @@ +FROM quay.io/bashell/alpine-bash:latest + +MAINTAINER Chaiwat Suttipongsakul "cwt@bashell.com" + +RUN apk update \ + && apk upgrade \ + && apk add --no-cache \ + lighttpd \ + lighttpd-mod_auth \ + lighttpd-mod_webdav \ + && mkdir -p /var/lib/lighttpd/cache/compress \ + && chown -R lighttpd:lighttpd /var/lib/lighttpd \ + && ln -s /dev/fd/3 /var/log/lighttpd/access.log \ + && ln -s /dev/stderr /var/log/lighttpd/error.log \ + && rm -rf /var/cache/*/* + +COPY start.sh /start.sh + +VOLUME ["/etc/lighttpd", "/var/lib/lighttpd", "/var/www"] + +STOPSIGNAL SIGTERM + +EXPOSE 443/tcp 80/tcp + +CMD ["/start.sh"] + diff --git a/start.sh b/start.sh new file mode 100755 --- /dev/null +++ b/start.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +chown lighttpd:lighttpd /var/lib/lighttpd +chown lighttpd:lighttpd /var/lib/lighttpd/cache +chown lighttpd:lighttpd /var/lib/lighttpd/cache/compress + +exec 3>&1 +/usr/sbin/lighttpd-angel -D -f /etc/lighttpd/lighttpd.conf +