package dockerfile-opam
Install
Dune Dependency
Authors
Maintainers
Sources
md5=57dd2803ecbe82ea9f1e3773056048ea
sha512=b1272c855eca5df085374d49cc5a92a8ae17a9a75f9f265b7c6b76383da0e71f8cdf6eb3e3f86b1049c921d147cd82a7711867266f709b4009846c137ddfb4db
doc/dockerfile-opam/Dockerfile_opam/index.html
Module Dockerfile_opam
Source
Rules for generating Dockerfiles involving OPAM.
These are deployed at ocaml/opam 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.
Run Opam commands across a matrix of Docker containers. Each of these containers represents a different version of OCaml, Opam and an OS distribution (such as Debian or Alpine).
run_as_opam fmt
runs the command specified by the fmt
format string as the opam
user.
val install_opam_from_source :
?add_default_link:bool ->
?prefix:string ->
?enable_0install_solver:bool ->
?with_vendored_deps:bool ->
branch:string ->
hash:string ->
unit ->
Dockerfile.t
Commands to install OPAM via a source code checkout from GitHub. The branch
can be a git tag or branch (e.g. 2.0
for opam 2.0.x or 2.1
for the opam 2.1.x). The binaries are installed under <prefix>/bin/opam-<branch>
, defaulting to /usr/local/bin
. If add_default_link
is true (the default), then the opam-<branch>
binary is hardlinked to opam
. Set it to false if you want to install multiple opam binaries from different branches in the same container. If enable_0install_solver
is true (false by default), then the builtin-0install
solver should be accessible in the resulting opam binary. Configure opam build with_vendored_deps
. Required for opam 2.2.
type opam_hashes = {
opam_2_0_hash : string;
opam_2_1_hash : string;
opam_2_2_hash : string;
opam_2_3_hash : string;
opam_master_hash : string;
}
val gen_opam2_distro :
?override_tag:string ->
?clone_opam_repo:bool ->
?arch:Ocaml_version.arch ->
?labels:(string * string) list ->
opam_hashes:opam_hashes ->
Distro.t ->
string * Dockerfile.t
gen_opam2_distro ~opam_hashes d
will generate a Dockerfile for Linux distribution d
with opam 2.0, opam 2.1, opam 2.2 and opam master, per hash given in parameter.
ocaml_depexts distro version
returns packages that are required under distro
by the OCaml distribution at version version
.
all_ocaml_compilers hub_id arch distro
will generate an opam2 container that has all the recent OCaml compilers installed into a distribution distro
on architecture arch
.
val separate_ocaml_compilers :
string ->
Ocaml_version.arch ->
Distro.t ->
(string * Dockerfile.t) list
separate_ocaml_compilers hub_id arch distro
will install a list of Dockerfiles that build individual OCaml compiler versions and their variants (e.g. flambda) in separate containers.
deprecated
is a minimal container that outputs a deprecation error. This is used to replace unsupported containers on the Hub rather than leaving an unmaintained distribution lying around with possible security holes.
multiarch_manifest ~target ~platforms
will generate a manifest-tool compliant yaml file to build a target
on the given multiarch platforms
.