forked from adept/hledger-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
39 lines (27 loc) · 842 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.8.4 as dev
ENV RESOLVER lts-16.12
ENV LC_ALL=C.UTF-8
RUN stack setup --resolver=$RESOLVER && stack install --resolver=$RESOLVER \
hledger-lib-1.20.4 \
hledger-1.20.4 \
hledger-ui-1.20.4 \
hledger-web-1.20.4 \
hledger-iadd-1.3.12 \
hledger-interest-1.6.0 \
pretty-simple-4.0.0.0 \
prettyprinter-1.7.0
FROM debian:stable-slim
MAINTAINER Dmitry Astapov <[email protected]>
RUN apt-get update && apt-get install --yes libgmp10 libtinfo6 sudo && rm -rf /var/lib/apt/lists
RUN adduser --system --ingroup root hledger
RUN usermod -aG sudo hledger
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
COPY --from=dev /root/.local/bin/hledger* /usr/bin/
ENV LC_ALL C.UTF-8
COPY data /data
VOLUME /data
EXPOSE 5000 5001
COPY start.sh /start.sh
USER hledger
WORKDIR /data
CMD ["/start.sh"]