fix build issues in docker

This commit is contained in:
Simon Cruanes 2026-04-06 15:02:11 -04:00
parent 4586c0622e
commit c18f6b1cf7
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4

View file

@ -8,7 +8,8 @@ RUN apt-get update && \
apt-get install -y --no-install-recommends ca-certificates curl git unzip build-essential $BASE_OS_PACKAGES && \
rm -rf /var/lib/apt/lists/* && \
curl -fsSL https://github.com/ocaml/opam/releases/download/2.5.0/opam-2.5.0-x86_64-linux -o /usr/local/bin/opam && \
chmod +x /usr/local/bin/opam
chmod +x /usr/local/bin/opam && \
git config --global --add safe.directory '*'
WORKDIR /root/w
# --- Stage 2: opam-setup (builds the switch, discarded) ---
@ -33,5 +34,5 @@ RUN opam install --no-depexts $BASE_PACKAGES && \
FROM base
COPY --from=opam-setup /root/.opam /root/.opam
COPY --from=opam-setup /root/w/_opam /root/w/_opam
ENV OPAMSWITCH=/root/w PATH=/root/w/_opam/bin:$PATH
ENV OPAMROOT=/root/.opam OPAMSWITCH=/root/w PATH=/root/w/_opam/bin:$PATH
WORKDIR /root/w