summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Mortier <mort@cantab.net>2018-12-10 23:41:43 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2018-12-20 22:44:02 +0100
commit6dcb09c34dfe06782055c2f2d2f4480fd7ffe912 (patch)
treeb7c54692b68407e1951e2110fe9b9798db730244
parentc0fc90f124333d53dd198df07fe928016c9ba292 (diff)
downloadalpine-mksite-6dcb09c34dfe06782055c2f2d2f4480fd7ffe912.tar.bz2
alpine-mksite-6dcb09c34dfe06782055c2f2d2f4480fd7ffe912.tar.xz
docker: add `Dockerfile` and `build`/`test` targets
Signed-off-by: Richard Mortier <mort@cantab.net>
-rw-r--r--Dockerfile20
-rw-r--r--Makefile5
2 files changed, 24 insertions, 1 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..3ff57c1
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,20 @@
+FROM alpine
+
+WORKDIR /site
+COPY . /site
+
+RUN apk update --no-cache && apk add --no-cache \
+ busybox-extras \
+ curl \
+ git \
+ lua5.3 \
+ lua-discount \
+ lua-feedparser \
+ lua-filesystem \
+ lua-lustache \
+ lua-lyaml \
+ make
+
+RUN make
+
+ENTRYPOINT ["busybox-extras", "httpd", "-f", "-vv", "-p", "8000", "-h", "_out/"]
diff --git a/Makefile b/Makefile
index 8db3d5d..140ed60 100644
--- a/Makefile
+++ b/Makefile
@@ -75,4 +75,7 @@ $(out)/atom.xml: news.yaml
$(generate_atom) _atom.template.xml $< > $@.tmp
mv $@.tmp $@
-
+build:
+ docker build -t alpine-mksite .
+test:
+ docker run -t -p 8000:8000 alpine-mksite