From 99e2009c2b33650510052b25f2c177dec4f6eb17 Mon Sep 17 00:00:00 2001 From: giles Date: Wed, 25 Mar 2026 01:20:48 +0000 Subject: [PATCH] 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) --- run-tests.sh | 4 ++-- sx/Dockerfile | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/run-tests.sh b/run-tests.sh index 3ee87a2..854d984 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -11,8 +11,8 @@ set -euo pipefail cd "$(dirname "$0")" -QUICK=false -SX_ONLY=false +QUICK="${QUICK:-false}" +SX_ONLY="${SX_ONLY:-false}" for arg in "$@"; do case "$arg" in --quick) QUICK=true ;; diff --git a/sx/Dockerfile b/sx/Dockerfile index c0f26cf..08a6bc8 100644 --- a/sx/Dockerfile +++ b/sx/Dockerfile @@ -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