forked from moby/datakit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.github
31 lines (23 loc) · 1.1 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
FROM ocaml/opam:alpine
# Workaround for https://github.com/docker/datakit/issues/152
RUN cd /home/opam/opam-repository && git reset --hard dd38f0690ff01c8e1ed0eed231307ba4d00c50df && opam update
RUN opam depext lwt ssl && opam install lwt alcotest oasis
RUN opam pin add asl.dev https://github.com/mirage/ocaml-asl.git
#RUN cd /home/opam/opam-repository && git pull && opam update
RUN opam pin add hvsock https://github.com/djs55/ocaml-hvsock.git
RUN opam pin add github --dev
COPY opam /home/opam/src/datakit/opam
RUN opam pin add datakit.dev /home/opam/src/datakit -n
RUN opam depext datakit ssl github && \
opam install ssl github datakit --deps # Install datakit deps
COPY . /home/opam/src/datakit/
RUN sudo chown -R opam.nogroup /home/opam/src
WORKDIR /home/opam/src/datakit
ENV GITHUB=enable
RUN opam config exec -- make && make test && make install
EXPOSE 5640
RUN sudo mkdir /data && sudo chown opam.nogroup /data && chmod 700 /data && \
sudo cp /home/opam/.opam/system/bin/datakit /usr/bin/datakit
ENV GITHUB_DEBUG 1
ENTRYPOINT ["/usr/bin/datakit"]
CMD ["--url=tcp://0.0.0.0:5640", "--git=/data", "-vv"]