When the container images on https://hub.docker.com/r/ocaml/opam2 were first assembled, the intention was to provide a distribution-specific image with all of the OCaml compilers available in a single image. This in turn allowed for CI systems to pull a single image and then
opam switch into the different compilers very efficiently.
However, as time marches on, the number of simultaneous compiler images has become quite large, and this feature doesn’t seem to get much use. Therefore, we are planning to change the format of the OCaml compiler images hosted on hub.docker.com:
- use the scheme that has been deployed on https://hub.docker.com/r/ocurrent/opam which is that a single image has a single compiler instance, with the version being explicit in the tag.
- continue pushing the multiarch images to both ocurrent/opam and ocaml/opam2 from the same https://github.com/ocurrent/docker-base-images instance. This will not take up much extra space since the content on the Hub is hashed and this is just a set of new tags.
- ensure that the CI scripts over at https://github.com/ocaml/ocaml-ci-scripts continue to work uninterrupted. The only observable change in the new images aside from the lack of multiple compilers is that WORKDIR is set to
/home/opam/opam-repositoryin the new images.
Comments welcome on all of this – if you are using the “fat” compiler images to reduce your bandwidth, please let me know. Most users I’ve seen prefer the slimmer single-compiler images instead, hence this change. You can comment here or on the https://github.com/ocaml/ocaml.org/issues/1195 tracking issue.