Fix sx_docs Dockerfile: install dune + set PATH for OCaml build

The opam base image has dune in the switch but not on PATH.
RUN eval $(opam env) doesn't persist across layers. Install dune
explicitly and set PATH so dune is available in build steps.

Also fix run-tests.sh to respect QUICK env var from caller
(was being overwritten to false).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-25 01:20:48 +00:00
parent 1ae5906ff6
commit 99e2009c2b
2 changed files with 5 additions and 3 deletions

View File

@@ -3,12 +3,14 @@
# --- Stage 1: Build OCaml SX kernel ---
FROM ocaml/opam:debian-12-ocaml-5.2 AS ocaml-build
USER opam
RUN opam install dune -y
ENV PATH="/home/opam/.opam/5.2/bin:${PATH}"
WORKDIR /home/opam/sx
COPY --chown=opam:opam hosts/ocaml/dune-project ./
COPY --chown=opam:opam hosts/ocaml/lib/ ./lib/
COPY --chown=opam:opam hosts/ocaml/bin/dune hosts/ocaml/bin/run_tests.ml \
hosts/ocaml/bin/debug_set.ml hosts/ocaml/bin/sx_server.ml ./bin/
RUN eval $(opam env) && dune build bin/sx_server.exe
RUN dune build bin/sx_server.exe
# --- Stage 2: Python app ---
FROM python:3.11-slim AS base