ocurrent / docker-base-images

Generate various Docker ocaml images
https://images.ci.ocaml.org
MIT License
29 stars 19 forks source link

Set the archive-mirrors field in the opam config #306

Open hannesm opened 3 weeks ago

hannesm commented 3 weeks ago

The issue at hand is that these "base images" use the opam-repository from a git remote, and thus don't use the very nice opam.ocaml.org source archive cache.

Now, since opam 2.2 we can set the archive-mirrors variable (globally) for an opam installation by: opam option --global archive-mirrors="https://opam.ocaml.org/cache"

If somewhere in this pile of code, where opam 2.2 is likely used anyways (isn't it?), we would set the archive-mirrors, magically all the request timeout and quota exceeded / temporary download failures would vanish.

Unfortunately my knowledge of docker and these base images is not mature enough to point at the code to embed such a line. But if all works well, this would massively reduce temporary CI failures. so please consider this.

//cc @shonfeder