-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
36 lines (27 loc) · 987 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
33
34
35
36
# Stack resolver 18.18 uses ghc 8.10.7
FROM haskell:8.10.7 as build
RUN mkdir -p /sahasrara/build
WORKDIR /sahasrara/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" /sahasrara/build/bin
FROM haskell:8.10.7-slim as app
# System runtime dependencies
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 /sahasrara
WORKDIR /sahasrara
COPY --from=build /sahasrara/build/bin .
# apparently we need the .git folder
COPY .git .git
# also we need the runtime resources folder
COPY resources resources
# Run the bot
CMD /sahasrara/sahasrara-exe