Skip to content

Commit

Permalink
fix(docker): Add missing libs for compiler-libs related features
Browse files Browse the repository at this point in the history
Spotted with (docker, `learn-ocaml build --enable-cmo-build`) from PR ocaml-sf#458:
```
LOGS:
Learnocaml v.0.14.0 running.
Updating app at ./www
given_int_0exo           (build .cmo)
Cannot process exercises: Env.Error(_)
```
Note: this latter exception backtrace could be improved (giving more details).

Close ocaml-sf#438
  • Loading branch information
erikmd committed Nov 7, 2021
1 parent 1f73141 commit ce92648
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Expand Up @@ -66,7 +66,11 @@ EXPOSE 8443
USER learn-ocaml
WORKDIR /home/learn-ocaml

ARG opam_switch="/home/opam/.opam/4.12"

COPY --from=compilation /home/opam/install-prefix /usr
COPY --from=compilation "$opam_switch/bin"/ocaml* "$opam_switch/bin/"
COPY --from=compilation "$opam_switch/lib/ocaml" "$opam_switch/lib/ocaml/"

ENTRYPOINT ["dumb-init","/usr/bin/learn-ocaml","--sync-dir=/sync","--repo=/repository"]
CMD ["build","serve"]
Expand Down
4 changes: 4 additions & 0 deletions Dockerfile.test-server
Expand Up @@ -64,7 +64,11 @@ EXPOSE 8443
USER learn-ocaml
WORKDIR /home/learn-ocaml

ARG opam_switch="/home/opam/.opam/4.12"

COPY --from=compilation /home/opam/install-prefix /usr
COPY --from=compilation "$opam_switch/bin"/ocaml* "$opam_switch/bin/"
COPY --from=compilation "$opam_switch/lib/ocaml" "$opam_switch/lib/ocaml/"

ENTRYPOINT ["dumb-init","/usr/bin/learn-ocaml","--sync-dir=/sync","--repo=/repository"]
CMD ["build","serve"]

0 comments on commit ce92648

Please sign in to comment.