-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile.rpl-cli
30 lines (24 loc) · 1013 Bytes
/
Dockerfile.rpl-cli
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
FROM haskell:8.4.4 AS build
RUN stack update
RUN mkdir /work
WORKDIR /work
COPY stack.yaml ./
COPY net-spider/ ./net-spider/
COPY net-spider-rpl/ ./net-spider-rpl/
COPY net-spider-cli/ ./net-spider-cli/
RUN mkdir ./test-readme
COPY test-readme/test-readme.cabal ./test-readme/
RUN mkdir ./net-spider-pangraph
COPY net-spider-pangraph/net-spider-pangraph.cabal ./net-spider-pangraph/
RUN mkdir ./net-spider-rpl-cli
COPY net-spider-rpl-cli/net-spider-rpl-cli.cabal ./net-spider-rpl-cli/
RUN stack --system-ghc install --only-dependencies net-spider-rpl-cli
COPY net-spider-rpl-cli/ net-spider-rpl-cli/
RUN stack --system-ghc install --flag net-spider-rpl-cli:static net-spider-rpl-cli
## "haskell" image is a little big for a image for
## executable. However, an executable made by GHC is not fully static
## or self-contained, so we'd better prepare the same environment as
## the image for build.
FROM haskell:8.4.4
COPY --from=build /root/.local/bin/net-spider-rpl-cli /
ENTRYPOINT ["/net-spider-rpl-cli"]