Removing "fat" compiler images on hub.docker.com/r/ocaml/opam2

I would argue that basically nobody needs the git history but many the ability to update the opam repository inside the Docker image.

Thanks for the suggestion – It depends what use you have for the shallow images that do not have git history. A lot of CI systems using these images git checkout to a specific Git revision of opam-repo when doing their tests (including the opam-repo-ci). Without the history, that pinning would fail.

That doesn’t mean that we can’t figure out some combination of git --depth options to reduce the default size of the repo though, since the CI should be able to pull a revision in. One complexity with these images is that the git version is inside the container, and so the CIs need to support some pretty ancient versions (like CentOS 7) which is not yet EOL and has users. But if you can come up with a suggestion of how to use modern git to reduce duplication, I’m sure if we can figure out the backwards compatibility issues.

If you could open an issue on Issues · ocaml/opam · GitHub noting that disk usage is a concern for git checkouts of opam-repo, that would also be helpful. It’s not been a focus in opam 2.1, but we could improve the situation in a later release.

As a followup to this overall thread, the migration continues to ocaml/opam, described in Ocurrent/opam Docker images have moved to ocaml/opam