1- FROM  ocaml/opam:alpine-3.13-ocaml-4.05  as compilation
1+ FROM  ocaml/opam:alpine-3.13-ocaml-4.12  as compilation
22LABEL  Description="learn-ocaml building"  Vendor="OCamlPro" 
33
4- WORKDIR  learn-ocaml
4+ WORKDIR  /home/opam/ learn-ocaml
55
6- COPY  learn-ocaml.opam learn-ocaml.opam.locked learn-ocaml-client.opam ./
6+ COPY  learn-ocaml.opam learn-ocaml.opam.locked learn-ocaml-client.opam learn-ocaml-client.opam.locked  ./
77RUN  sudo chown -R opam:nogroup .
88
99ENV  OPAMYES true
1010RUN  echo 'archive-mirrors: [ "https://opam.ocaml.org/cache" ]'  >> ~/.opam/config \
1111  && opam repository set-url default http://opam.ocaml.org \
12-   && opam switch 4.05  \
12+   && opam switch 4.12  \
1313  && echo 'pre-session-commands: [ "sudo" "apk" "add" depexts ]'  >> ~/.opam/config \
1414  && opam install . --deps-only --locked
1515
@@ -42,7 +42,7 @@ WORKDIR /learnocaml
4242
4343COPY  --from=compilation /home/opam/install-prefix/bin/learn-ocaml-client /usr/bin
4444
45- ENTRYPOINT  ["dumb-init" ,"learn-ocaml-client" ]
45+ ENTRYPOINT  ["dumb-init" ,"/usr/bin/ learn-ocaml-client" ]
4646
4747LABEL  org.opencontainers.image.title="learn-ocaml-client" 
4848LABEL  org.opencontainers.image.description="learn-ocaml command-line client" 
@@ -68,7 +68,7 @@ WORKDIR /home/learn-ocaml
6868
6969COPY  --from=compilation /home/opam/install-prefix /usr
7070
71- ENTRYPOINT  ["dumb-init" ,"learn-ocaml" ,"--sync-dir=/sync" ,"--repo=/repository" ]
71+ ENTRYPOINT  ["dumb-init" ,"/usr/bin/ learn-ocaml" ,"--sync-dir=/sync" ,"--repo=/repository" ]
7272CMD  ["build" ,"serve" ]
7373
7474LABEL  org.opencontainers.image.title="learn-ocaml" 
0 commit comments