mirror of
https://github.com/reanimate/reanimate.git
synced 2026-09-09 07:03:11 +00:00
34 lines
891 B
Text
34 lines
891 B
Text
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 discord-bot dependencies and cache the layer
|
|
ADD discord-bot/discord-bot.cabal discord-bot/stack.yaml ./discord-bot/
|
|
RUN cd discord-bot && \
|
|
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 discord-bot discord-bot
|
|
RUN (cd discord-bot && \
|
|
stack install --no-install-ghc --system-ghc) && \
|
|
discord-bot test
|
|
|
|
|
|
ENTRYPOINT discord-bot
|