Skip to content

Instantly share code, notes, and snippets.

@parambirs
Created October 20, 2015 11:13
Show Gist options
  • Select an option

  • Save parambirs/1f6d3e43dd7700a21262 to your computer and use it in GitHub Desktop.

Select an option

Save parambirs/1f6d3e43dd7700a21262 to your computer and use it in GitHub Desktop.
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
ADD ./LICENSE /opt/server/LICENSE
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