-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathDockerfile
42 lines (29 loc) · 1.19 KB
/
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
40
41
42
# ATTENTION: Also update the version of the final image
FROM haskell:9.6.6-slim-bullseye as builder
WORKDIR /tasklite
COPY stack.yaml stack.yaml
COPY tasklite/README.md tasklite/README.md
COPY tasklite/example-config.yaml tasklite/example-config.yaml
COPY tasklite/package.yaml tasklite/package.yaml
COPY tasklite-core/README.md tasklite-core/README.md
COPY tasklite-core/example-config.yaml tasklite-core/example-config.yaml
COPY tasklite-core/package.yaml tasklite-core/package.yaml
RUN stack install --only-dependencies tasklite-core
########## Install CLI tool ##########
COPY tasklite-core tasklite-core
COPY tasklite tasklite
# Needed for retrieving the version number
COPY .git .git
# Remove after issue https://github.com/commercialhaskell/stack/issues/3348
RUN mkdir -p /etc/stack
RUN echo "allow-different-user: true" >> /etc/stack/config.yaml
RUN stack install tasklite
# Same OS version as the builder image
FROM haskell:9.6.6-slim-bullseye
RUN apt-get update && \
apt-get install -y libgmp10
COPY --from=builder \
/tasklite/tasklite/example-config.yaml \
/root/.config/tasklite/config.yaml
COPY --from=builder /root/.local/bin/tasklite /usr/local/bin/tasklite
ENTRYPOINT ["tasklite"]