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`):

```
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).

This patch should also fix ocaml-sf#438

However the CI will still fail because of a learn-ocaml-corpus corner case:
```
…
given_persistent_0arrays (build .cmo)
Cannot process exercises: Typemod.Error(_, _, _)
```
  • Loading branch information
erikmd committed Nov 7, 2021
1 parent 3517788 commit b1f9ebe
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" "$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" "$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 b1f9ebe

Please sign in to comment.