[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
|
FROM fpco/stack-build
|
||||||
MAINTAINER Vincent Ambo <dev@tazj.in>
|
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
|
# Base setup
|
||||||
VOLUME /var/tazblog
|
VOLUME /var/tazblog
|
||||||
EXPOSE 8000 8070
|
EXPOSE 8000 8070
|
||||||
|
@ -8,8 +13,7 @@ ENV PATH /root/.local/bin:$PATH
|
||||||
|
|
||||||
# Build blog
|
# Build blog
|
||||||
ADD . /opt/tazblog
|
ADD . /opt/tazblog
|
||||||
WORKDIR /opt/tazblog
|
RUN stack install && cp /root/.local/bin/tazblog* /usr/bin/
|
||||||
RUN stack install && cp /root/.local/bin/tazblog /usr/bin/tazblog
|
|
||||||
|
|
||||||
# Done!
|
# Done!
|
||||||
CMD tazblog
|
CMD tazblog
|
||||||
|
|
Loading…
Reference in a new issue