2015-11-19 16:57:03 +01:00
|
|
|
FROM fpco/stack-build
|
|
|
|
MAINTAINER Vincent Ambo <dev@tazj.in>
|
|
|
|
|
2015-11-29 16:52:17 +01:00
|
|
|
# Cache dependencies
|
|
|
|
ADD stack.yaml tazblog.cabal /opt/tazblog/
|
|
|
|
WORKDIR /opt/tazblog
|
|
|
|
RUN stack build --only-dependencies
|
|
|
|
|
2015-11-19 16:57:03 +01:00
|
|
|
# Base setup
|
|
|
|
VOLUME /var/tazblog
|
2015-11-19 19:31:25 +01:00
|
|
|
EXPOSE 8000 8070
|
|
|
|
ENV PATH /root/.local/bin:$PATH
|
2015-11-19 16:57:03 +01:00
|
|
|
|
|
|
|
# Build blog
|
2015-11-19 19:31:25 +01:00
|
|
|
ADD . /opt/tazblog
|
2015-11-29 16:52:17 +01:00
|
|
|
RUN stack install && cp /root/.local/bin/tazblog* /usr/bin/
|
2015-11-19 16:57:03 +01:00
|
|
|
|
|
|
|
# Done!
|
2015-11-19 19:31:25 +01:00
|
|
|
CMD tazblog
|