2020-11-03 00:21:40 +03:00
|
|
|
FROM haskell:8-buster AS builder
|
2017-05-17 19:58:06 +03:00
|
|
|
|
2020-04-17 17:49:04 +03:00
|
|
|
RUN apt-get update -qq && \
|
2022-03-08 03:48:15 +03:00
|
|
|
apt-get install -qq -y libpcre3 libpcre3-dev build-essential pkg-config --fix-missing --no-install-recommends && \
|
2020-04-17 17:49:04 +03:00
|
|
|
apt-get clean && \
|
|
|
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
2017-05-17 19:58:06 +03:00
|
|
|
|
|
|
|
RUN mkdir /log
|
|
|
|
|
|
|
|
WORKDIR /duckling
|
|
|
|
|
2020-11-03 00:21:40 +03:00
|
|
|
ADD . .
|
2017-10-27 21:15:48 +03:00
|
|
|
|
2020-03-30 19:44:02 +03:00
|
|
|
ENV LANG=C.UTF-8
|
|
|
|
|
2017-10-27 21:15:48 +03:00
|
|
|
RUN stack setup
|
2020-04-17 17:49:04 +03:00
|
|
|
|
|
|
|
ADD . .
|
|
|
|
|
2018-01-03 17:00:08 +03:00
|
|
|
# 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.
|
2020-04-17 17:49:04 +03:00
|
|
|
RUN stack install
|
|
|
|
|
2020-11-03 00:21:40 +03:00
|
|
|
FROM debian:buster
|
2020-04-17 17:49:04 +03:00
|
|
|
|
|
|
|
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
|
2017-05-17 19:58:06 +03:00
|
|
|
|
2020-04-17 17:49:04 +03:00
|
|
|
CMD ["duckling-example-exe", "-p", "8000"]
|