Add Docker build

This commit is contained in:
Martin Mauch 2015-09-17 17:43:00 +02:00
parent 7b9852e2b5
commit e22a363907
2 changed files with 25 additions and 0 deletions

5
.dockerignore Normal file
View File

@ -0,0 +1,5 @@
.dockerignore
Dockerfile*
.git
.vagrant
**/.stack-work/

20
Dockerfile Normal file
View File

@ -0,0 +1,20 @@
FROM haskell:7.10.3
WORKDIR /opt/unison
RUN apt-get update -q && \
apt-get install -qy git nodejs nodejs-legacy && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ADD stack.yaml /opt/unison/stack.yaml
RUN stack setup
ADD editor/stack.yaml /opt/unison/editor/stack.yaml
RUN cd editor && stack setup
ADD shared/unison-shared.cabal /opt/unison/shared/unison-shared.cabal
ADD node/unison-node.cabal /opt/unison/node/unison-node.cabal
RUN stack build --only-dependencies
ADD editor/unison-editor.cabal /opt/unison/editor/unison-editor.cabal
RUN cd editor && stack build --only-dependencies
ADD . /opt/unison/
RUN stack build unison-node
RUN cd editor && stack build && ./make-editor-html
CMD stack exec node
EXPOSE 8080