-
Notifications
You must be signed in to change notification settings - Fork 152
/
Dockerfile.github
43 lines (28 loc) · 1.18 KB
/
Dockerfile.github
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
43
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 tls
COPY check-libev.ml /tmp/check-libev.ml
RUN opam 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 opam install datakit-bridge-github --deps -t
# copy local sources
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-bridge-github -ytv
RUN sudo cp $(opam config exec -- which datakit-bridge-github) /usr/bin/
FROM alpine:3.9
RUN apk add --no-cache libev gmp tzdata ca-certificates
EXPOSE 5640
EXPOSE 5641
ENTRYPOINT ["/usr/bin/datakit-bridge-github"]
CMD ["--listen=tcp://0.0.0.0:5641", "-v", "--datakit=tcp:127.0.0.1:5640"]
COPY --from=0 /usr/bin/datakit-bridge-github /usr/bin/datakit-bridge-github