[opam-devel] docker hub update?

Anil Madhavapeddy anil at recoil.org
Mon Apr 11 14:03:16 BST 2016

> On 11 Apr 2016, at 13:19, Grégoire Henry <gregoire.henry at ocamlpro.com> wrote:
> Hi Anil,
>> To fix this and address every usecase, I'd like to break up the container layers to be more fine-grained:
>> - ocaml/ocaml - remains as it is right now
>> - ocaml/opam-base - provides an installed OPAM binary, but _not_ initialised, and has the capability to volume mount an OPAM repository from which it can initialise the local base without any data being held in the container.
>> - ocaml/opam - embeds an OPAM repository checkout and works as-is right now
>> - ocaml/opam-archive: also volume mounts in an external archive/ directory so we do not have to embed the volume in a container
> What about including in `ocaml/opam-base` a "partial" OPAM repository
> with only the (some) compilers and initialize OPAM with it. Then
> `ocaml/opam` (or CI tools based on `ocaml/opam-base`) will replace the
> "partial" OPAM repository with the real one. If done correctly, they
> shouldn't have to recompile OCaml.

Yes I would really like this!  This could be easily done by running a git filter-subtree on the existing checkout to mirror something that containers only the compilers and a very small set of packages.

Louis, ThomasG, what do you think about this?  We could call this ocaml/opam-repository-minimal or something, and have it automatically generated in a manner similar to the rewrite scripts today.  It would have to work with OPAM-HEAD as well though, for compilers-as-packages.

> The partial OPAM repository could either be manually updated (e.g. at
> each OCaml release) or may be extracted from the official repository
> by a bot.

Agreed -- definitely the latter would be useful, since the extractor script could trigger a container rebuild only if there are changes in the core packages.  The same technique could also be used for wider slices of the main OPAM repository.


More information about the opam-devel mailing list