Module Dockerfile_opam
Rules for generating Dockerfiles involving OPAM.
These are deployed at ocaml/opam2 on the Docker Hub. The interfaces here may change as the production deployments there change, so please contact anil@recoil.org if you depend on these functions for your own infrastructure.
val run_as_opam : ('a, unit, string, Dockerfile.t) Pervasives.format4 ‑> 'arun_as_opam fmtruns the command specified by thefmtformat string as theopamuser.
val install_opam_from_source : ?prefix:string ‑> ?branch:string ‑> unit ‑> Dockerfile.tCommands to install OPAM via a source code checkout from GitHub. The
branchdefaults to the1.2stable branch. The binaries are installed under<prefix>/bin, defaulting to/usr/local/bin.
val gen_opam2_distro : ?labels:(string * string) list ‑> Dockerfile_distro.t ‑> string * Dockerfile.tgen_opam2_distro dwill generate a Dockerfile for Linux distributiond.- returns
a tuple of the Docker tag and the Dockerfile.
val opam2_mirror : string ‑> Dockerfile.topam2_mirror hub_idgenerates an opam2 mirror archive that stores the results ofopam admin makein the container when built. This container is suitable to serve as an archive mirror usingcohttp-lwt-unix
val all_ocaml_compilers : string ‑> Ocaml_version.arch ‑> Dockerfile_distro.t ‑> string * Dockerfile.tall_ocaml_compilers hub_id arch distrowill generate an opam2 container that has all the recent OCaml compilers installed into a distributiondistroon architecturearch.
val separate_ocaml_compilers : string ‑> Ocaml_version.arch ‑> Dockerfile_distro.t ‑> (string * Dockerfile.t) listseparate_ocaml_compilers hub_id arch distrowill install a list of Dockerfiles that build individual OCaml compiler versions and their variants (e.g. flambda) in separate containers.
val bulk_build : string ‑> Dockerfile_distro.t ‑> Ocaml_version.t ‑> string ‑> Dockerfile.tbulk_build hub_id distro ov revwill setup a bulk build environment for OCaml versionovon distributiondistrousing the Git revisionrevfrom opam-repository.