forked from reanimate/reanimate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.playground
36 lines (28 loc) · 914 Bytes
/
Dockerfile.playground
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM reanimate/base
WORKDIR /src
# Install reanimate dependencies and cache the layer
ADD reanimate.cabal ./
ADD stack-lts-16.yaml ./stack.yaml
RUN stack build --only-dependencies --no-install-ghc --system-ghc --haddock
# Install playground dependencies and cache the layer
ADD playground/playground.cabal playground/stack.yaml ./playground/
RUN cd playground && \
stack build --only-dependencies --no-install-ghc --system-ghc
# Add source after dependencies have been installed as to not invalidate the caches
ADD data data
ADD src src
ADD unix unix
ADD windows windows
ADD .git .git
ADD viewer-elm viewer-elm
ADD Setup.hs ./
# Build reanimate
RUN stack build --no-install-ghc --system-ghc
# Add bot sources and build it
ADD playground playground
RUN (cd playground && \
stack install --no-install-ghc --system-ghc) && \
playground test
EXPOSE 10161/tcp
EXPOSE 10162/tcp
ENTRYPOINT playground