-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.arm32v7
36 lines (23 loc) · 934 Bytes
/
Dockerfile.arm32v7
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 opam:debian-arm32v7-9
WORKDIR /home/opam/src
RUN sudo git clone https://github.com/joaosreis/ocaml-uri.git && \
opam pin add -yn uri ocaml-uri/ && \
opam depext uri && \
opam install uri && \
sudo rm -rf ocaml-uri/
RUN opam remote add dev git://github.com/joaosreis/opam-repository
COPY price-tracker-exe.opam .
RUN opam pin add -yn price-tracker-exe . && \
opam depext price-tracker-exe && \
opam install --deps-only price-tracker-exe
COPY . .
RUN sudo chown -R opam /home/opam/src && \
opam config exec make deps && \
opam config exec make && \
opam depext -ln price-tracker-exe | egrep -o "\-\s.*" | sed "s/- //" > depexts
FROM debian:9
WORKDIR /app
COPY --from=0 /home/opam/src/bin/price-tracker-exe price-tracker.exe
COPY --from=0 /home/opam/src/depexts depexts
RUN apt-get update && cat depexts | xargs apt-get install -y && rm -rf /var/cache/apt/*
CMD ./price-tracker.exe