Skip to content

confused by the ocaml5 images on Docker Hub #203

Open
@gasche

Description

@gasche

I just looked at a CI run for a CI script using alpine-3.15-ocaml-5.0, and I found it surprising.

This ocaml-5.0 image is not actually using a 5.0 release, but it seems to use the 5.0 maintenance branch. Relevant command:

RUN /bin/sh -c opam switch create 5.0 --packages=ocaml-variants.5.0.0+trunk # buildkit

I expected to get the 5.0.0 release instead (more precisely, from the name "5.0", the latest 5.0.x release, which currently is 5.0.0). In fact it looks like alpine-3.17-ocaml-5.0 uses 5.0.0, as well as alpine-ocaml-5.0 which I assume points to the latest alpine--ocaml-5.0 image.

Questions:

  • There is a naming convention for opam switches to tell if it is pointing at a trunk branch or at an actual release. Why don't docker image names follow this convention as well? How can users tell whether they get a stable switch or not? (Correct me if I'm wrong, but I assume that +trunk switches install the latest commit of the development-or-maintenance branch after each repo+switch update, which sounds like not the right default for most projects using OCaml CI.)
  • Is the image alpine-3.15-ocaml-5.0 never going to be updated and forever point to 5.0.0+trunk, or is it an oversight that alpine-3.17 uses the release but alpine-3.15 was not updated? (Both policies would make sense to me.)
  • In the actual run of the CI image that I observed yesterday, the output of ocamlc --version was 5.0.0+dev10-2022-11-25. This is not the result one would expect from a compiler using ocaml-5.0.0+trunk -- at least on the actual upstream repository the current version output is 5.0.1+dev0-2022-12-15). This makes sense if this image was produced a year ago and is not intended to be updated. But then: how can I tell which version of OCaml (ideally, for non-release configurations: which git commit) a specific CI image is doing? Is this information available elsewhere, or is the easiest way to download and load the image and somehow inspect it? (Bonus points if you know how to get the git commit from the installed switch data.)
  • There are also some -5.00 images, they seem to come from an older naming convention? (At first I assumed that maybe those were 5.0.0 images as opposed to some sort of rolling-5.0-release imaages.)

Is there some documentation somewhere of the expectations and best practices with using ocaml/opam CI images?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions