-
Notifications
You must be signed in to change notification settings - Fork 729
/
Dockerfile
39 lines (25 loc) · 954 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
37
38
39
FROM haskell:8-buster AS builder
RUN apt-get update -qq && \
apt-get install -qq -y libpcre3 libpcre3-dev build-essential pkg-config --fix-missing --no-install-recommends && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN mkdir /log
WORKDIR /duckling
ADD . .
ENV LANG=C.UTF-8
RUN stack setup
ADD . .
# NOTE:`stack build` will use as many cores as are available to build
# in parallel. However, this can cause OOM issues as the linking step
# in GHC can be expensive. If the build fails, try specifying the
# '-j1' flag to force the build to run sequentially.
RUN stack install
FROM debian:buster
ENV LANG C.UTF-8
RUN apt-get update -qq && \
apt-get install -qq -y libpcre3 libgmp10 --no-install-recommends && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
COPY --from=builder /root/.local/bin/duckling-example-exe /usr/local/bin/
EXPOSE 8000
CMD ["duckling-example-exe", "-p", "8000"]