-
Notifications
You must be signed in to change notification settings - Fork 10
/
Dockerfile
32 lines (24 loc) · 889 Bytes
/
Dockerfile
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
# stack resolver 18.18 uses ghc 8.10.7
FROM haskell:8.10.7 as build
RUN mkdir -p /tablebot/build
WORKDIR /tablebot/build
# system lib dependencies
RUN apt-get update -qq && \
apt-get install -qq -y libpcre3-dev build-essential pkg-config libicu-dev --fix-missing --no-install-recommends && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
COPY . .
RUN stack build --system-ghc
RUN mv "$(stack path --local-install-root --system-ghc)/bin" /tablebot/build/bin
FROM haskell:8.10.7-slim as app
# system runtime deps
RUN apt-get update -qq && \
apt-get install -qq -y libpcre3 libicu63 --fix-missing --no-install-recommends && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN mkdir -p /tablebot
WORKDIR /tablebot
COPY --from=build /tablebot/build/bin .
# apparently we need the .git folder
COPY .git .git
CMD /tablebot/tablebot-exe