Skip to content

Instantly share code, notes, and snippets.



Created Oct 20, 2015
What would you like to do?
FROM haskell:7.10
RUN cabal update
# Add .cabal file
ADD ./scotty-webapp-example.cabal /opt/server/scotty-webapp-example.cabal
# Docker will cache this command as a layer, freeing us up to
# modify source code without re-installing dependencies
RUN cd /opt/server && cabal install --only-dependencies -j4
# Add and Install Application Code
ADD ./server /opt/server/server
RUN cd /opt/server && cabal install
# Add installed cabal executables to PATH
ENV PATH /root/.cabal/bin:$PATH
# Default Command for Container
WORKDIR /opt/server
CMD ["scotty-webapp-example"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment