summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2018-05-28 20:53:00 +0200
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2018-05-28 20:53:13 +0200
commit9d5115e52c4c42af8249d8eb6f0ad3b8030f7c8d (patch)
tree3874790b285d3ef0817ea5f761a1c88a48a9070a /Dockerfile
parent87d26e7b5b94bea662ffb23ef9cc9b6b9d849696 (diff)
Add Dockerfile.
The Dockerfile uses deploy (https://shinmera.github.io/deploy/) to create a self-contained binary and packages it as a Docker image.
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile43
1 files changed, 43 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..159f748
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,43 @@
+###############
+### STAGE 0 ###
+###############
+
+FROM mcreations/sbcl:1.4.1
+
+RUN sbcl --eval "\
+ (progn \
+ (ql:quickload \"deploy\")) \
+ "
+
+COPY . /opt/quicklisp/local-projects/mulkcms
+
+RUN sbcl --eval "\
+ (progn \
+ (ql:quickload \"mulkcms-ht\")) \
+ "
+
+USER root
+RUN mkdir -p /opt/quicklisp/local-projects/mulkcms/bin
+RUN chown lisp /opt/quicklisp/local-projects/mulkcms/bin
+
+RUN sbcl --eval "\
+ (progn \
+ (asdf:make \"mulkcms-ht\")) \
+ "
+
+
+###############
+### STAGE 1 ###
+###############
+
+FROM debian:9-slim
+
+RUN apt-get update && apt-get install -y libssl1.0 && rm -rf /var/lib/apt/lists/* && apt-get clean
+
+
+COPY --from=0 /opt/quicklisp/local-projects/mulkcms/bin /mulkcms/bin
+COPY static-files /mulkcms/static-files
+COPY templates /mulkcms/templates
+
+WORKDIR /mulkcms
+ENTRYPOINT ["/mulkcms/bin/mulkcms-ht"]