# Lean 4 v4.36.0-rc2 + LML@0dc41a5 (+ Mathlib v4.36.0-rc2), prebuilt. # Built as the host uid so containers running as that uid can use (and copy-on-write) the prebuilt tree. FROM debian:bookworm-slim ARG UID=1000 ARG GID=1000 ENV DEBIAN_FRONTEND=noninteractive LANG=C.UTF-8 RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates curl git python3 ripgrep zstd xz-utils procps less jq unzip file \ && rm -rf /var/lib/apt/lists/* ENV ELAN_HOME=/opt/elan HOME=/opt/buildhome PATH=/opt/elan/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin RUN mkdir -p /opt/elan /opt/proj /opt/buildhome /opt/mathx && chown -R $UID:$GID /opt/elan /opt/proj /opt/buildhome USER $UID:$GID RUN curl -sSfL https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -o /tmp/elan-init.sh \ && sh /tmp/elan-init.sh -y --no-modify-path --default-toolchain leanprover/lean4:v4.36.0-rc2 \ && rm /tmp/elan-init.sh && lean --version && lake --version COPY --chown=$UID:$GID proj/ /opt/proj/ WORKDIR /opt/proj RUN lake update 2>&1 | tail -20 RUN lake exe cache get 2>&1 | tail -5 RUN lake build 2>&1 | tail -20 USER root COPY entry.sh /opt/mathx/entry.sh RUN chmod 755 /opt/mathx/entry.sh ENTRYPOINT ["/opt/mathx/entry.sh"]