about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Dockerfile8
1 files changed, 6 insertions, 2 deletions
diff --git a/Dockerfile b/Dockerfile
index 73ab1057a2ef..7d8b60582655 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,6 +1,11 @@
 FROM fpco/stack-build
 MAINTAINER Vincent Ambo <dev@tazj.in>
 
+# Cache dependencies
+ADD stack.yaml tazblog.cabal /opt/tazblog/
+WORKDIR /opt/tazblog
+RUN stack build --only-dependencies
+
 # Base setup
 VOLUME /var/tazblog
 EXPOSE 8000 8070
@@ -8,8 +13,7 @@ ENV PATH /root/.local/bin:$PATH
 
 # Build blog
 ADD . /opt/tazblog
-WORKDIR /opt/tazblog
-RUN stack install && cp /root/.local/bin/tazblog /usr/bin/tazblog
+RUN stack install && cp /root/.local/bin/tazblog* /usr/bin/
 
 # Done!
 CMD tazblog