[build] Cache Docker dependencies
This commit is contained in:
parent
792fe17f35
commit
e949c5e812
1 changed files with 6 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue