diff options
| author | Natanael Copa <ncopa@alpinelinux.org> | 2018-12-24 15:03:18 +0100 |
|---|---|---|
| committer | Natanael Copa <ncopa@alpinelinux.org> | 2018-12-24 15:05:11 +0100 |
| commit | fdd82f5e080b58c9ac8417b9528c919a8ada5a39 (patch) | |
| tree | 8b3e97657798a3c8887b795d977ea308e704d211 | |
| parent | 244ca486e307da7454838ab5b512db746cad8cc7 (diff) | |
| download | alpine-mksite-fdd82f5e080b58c9ac8417b9528c919a8ada5a39.tar.bz2 alpine-mksite-fdd82f5e080b58c9ac8417b9528c919a8ada5a39.tar.xz | |
Use darkhttpd for docker image
This is what we run in production.
Also move the COPY to after `apk add` so the installed packages are
cached and we don't need reinstall everything each time any file
changes.
| -rw-r--r-- | Dockerfile | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -1,11 +1,9 @@ FROM alpine -WORKDIR /site -COPY . /site - RUN apk update --no-cache && apk add --no-cache \ busybox-extras \ curl \ + darkhttpd \ git \ lua5.3 \ lua-discount \ @@ -13,8 +11,12 @@ RUN apk update --no-cache && apk add --no-cache \ lua-filesystem \ lua-lustache \ lua-lyaml \ - make + make \ + su-exec + +WORKDIR /site +COPY . /site RUN make all -ENTRYPOINT ["busybox-extras", "httpd", "-f", "-vv", "-c", "../httpd.conf", "-p", "8000", "-h", "_out/"] +ENTRYPOINT ["su-exec", "nobody:www-data", "darkhttpd", "/site/_out", "--port", "8000"] |
