-
Notifications
You must be signed in to change notification settings - Fork 152
/
Dockerfile.client
36 lines (23 loc) · 1.1 KB
/
Dockerfile.client
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
FROM ocaml/opam2:alpine
RUN sudo apk add --no-cache tzdata aspcud gmp-dev perl libev-dev m4
RUN opam switch 4.07
ENV OPAMERRLOGLEN=0 OPAMYES=1
RUN git -C /home/opam/opam-repository fetch origin && \
git -C /home/opam/opam-repository reset 340acb7d88264bf29485b1d292388e1d91dc2214 --hard && \
opam update -u
RUN opam install alcotest lwt conf-libev inotify
COPY check-libev.ml /tmp/check-libev.ml
RUN opam config exec -- ocaml /tmp/check-libev.ml
# cache opam install of dependencies
COPY *.opam /home/opam/src/datakit/
RUN opam pin add /home/opam/src/datakit/ -n
# install dependencies
RUN OPAMSOLVERTIMEOUT=120 opam install datakit-client-git datakit-client-9p --deps -t
COPY . /home/opam/src/datakit
RUN sudo chown opam.nogroup -R /home/opam/src/datakit
RUN opam update --dev && opam upgrade
RUN opam install datakit-client-9p datakit-client-git -tyv
RUN sudo mkdir /data && sudo chown opam.nogroup /data && chmod 700 /data && \
sudo cp $(opam config exec -- which datakit-mount) /usr/bin/datakit-mount
CMD bash -c "/usr/bin/datakit-mount -h $(getent hosts datakit | awk '{print $1}')"; \
bash