fix docker build

This commit is contained in:
Simon Cruanes 2026-04-06 15:47:39 -04:00
parent 5031be8d91
commit 755509893e
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4

12
deps/dockerfile.ocaml vendored
View file

@ -4,12 +4,14 @@ ARG BASE_OS=ubuntu:24.04
FROM $BASE_OS AS base FROM $BASE_OS AS base
ARG BASE_OS_PACKAGES="" ARG BASE_OS_PACKAGES=""
ENV OPAMROOTISOK=1 OPAMYES=1 OPAMCONFIRMLEVEL=unsafe-yes ENV OPAMROOTISOK=1 OPAMYES=1 OPAMCONFIRMLEVEL=unsafe-yes
RUN apt-get update && \ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
apt-get install -y --no-install-recommends ca-certificates curl git unzip build-essential $BASE_OS_PACKAGES && \ --mount=type=cache,target=/var/lib/apt,sharing=locked \
rm -rf /var/lib/apt/lists/* && \ rm -f /etc/apt/apt.conf.d/docker-clean && \
curl -fsSL https://github.com/ocaml/opam/releases/download/2.5.0/opam-2.5.0-x86_64-linux -o /usr/local/bin/opam && \ apt-get update && \
apt-get install -y --no-install-recommends ca-certificates curl git unzip build-essential netbase $BASE_OS_PACKAGES
RUN 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 '*' git config --system --add safe.directory '*'
WORKDIR /root/w WORKDIR /root/w
# --- Stage 2: opam-setup (builds the switch, discarded) --- # --- Stage 2: opam-setup (builds the switch, discarded) ---