Sign inSign up

ocamlpro/ocaml

By ocamlpro

•Updated 7 months ago

Image
5

10K+

ocamlpro/ocaml repository overview

⁠Lightweight Alpine Linux OCaml + opam images

⁠Contents

The images only contain:

  • The tiny Alpine Linux base
  • The basic OCaml and opam dependencies
  • Installed on the system in /usr/local,
    • an OCaml compiler at the version corresponding to the image tag
    • the last version of opam
  • An initialised opam root for default user ocaml

No switches are pre-created, but you are encouraged to use the provided system compiler to avoid re-building OCaml.

⁠Users and settings

The default user is named ocaml, has sudo rights, and opam's external dependency handling is enabled non-interactively.

⁠Usage

You should not need to opam update, use the moving tags (see below). Recommended CI script to get some project ready to build:

cd PROJECT_SRC                       # under /home/ocaml/
opam switch create . ocaml-system --deps --locked
opam exec -- [build and test commands]

This will avoid recompiling OCaml, provided you use the matching image version. You can further optimise by caching the _opam directory after the switch create command if your .opam / .opam.locked files are unchanged.

⁠Tags

  • Tags in the format X.XX-YEAR-MM-DD are stable and have the latest patch release of ocaml X.XX at said date.
  • Tags in the format X.XX point to the latest patch release of this version of OCaml X.XX.nn ; they get updated for new patch versions, releases of opam, and repository updates.
  • Tags in the format X.XX.X, as long as they are the latest patch version of that minor release, are also updated to have the latest opam release and updates of opam-repository.
  • latest

⁠Source

Generation and contents are pretty straight-forward. Dockerfile and scripts can be found at https://gitlab.ocamlpro.com/OCamlPro/ocaml-docker-images⁠

Tag summary

Content type

Image

Digest

sha256:d59095c30…

Size

270.4 MB

Last updated

7 months ago

docker pull ocamlpro/ocaml