-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
34 lines (23 loc) · 884 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
FROM ubuntu:18.04 as builder
RUN apt-get update
RUN apt-get install -y curl libgpgme-dev libpcre3-dev
RUN curl -sSL https://get.haskellstack.org/ | sh
RUN stack update
COPY unsafePerformIO.cabal .
COPY stack.yaml .
RUN stack install --only-dependencies
COPY . unsafePerformIO
WORKDIR unsafePerformIO
RUN stack test
RUN stack install
FROM ubuntu:18.04
RUN apt-get update
RUN apt-get install -y libgpgme-dev libpcre3-dev
COPY --from=0 /unsafePerformIO .
COPY --from=0 /root/.local/bin/unsafe-perform-io /unsafePerformIO/
EXPOSE 8080
ENTRYPOINT /unsafePerformIO/unsafe-perform-io --port 8080 \
--sqlite db/prod.db \
--init-sql init.sql \
--gnupg-homedir .gnupg \
--pgp-public-key wilfred.gpg