In my previous post on the base image builder, I included a footnote that we now had Windows 2025 workers, but I didn’t mention that the base images weren’t building.
Docker on Windows is very slow, so I have had a background task nudging these builds forward a little bit each day, and I’m pleased to now report that over the weekend, the images all built, and the entire dashboard is green!
The most significant change was moving away from fdopen’s opam to native opam. This has unlocked OCaml 5 builds for the first time but has removed images for OCaml < 4.13. MSVC 5.0-5.2 are not available as the MSVC port was broken until OCaml 5.3 ocaml/ocaml#12954. Each version is built on Windows Server LTSC 2019, LTSC 2022, and LTSC 2025.
| OCaml Version | MinGW | MSVC |
|---|---|---|
| 4.13.1 | ✓ | ✓ |
| 4.14.2 | ✓ | ✓ |
| 5.0.0 | ✓ | ✗ |
| 5.1.1 | ✓ | ✗ |
| 5.2.1 | ✓ | ✗ |
| 5.3.0 | ✓ | ✓ |
| 5.4.0 | ✓ | ✓ |
Below are the detailed changes.
PR 257 ocaml-dockerfile
src-opam/distro.ml:
- Changed
opam_repositoryto use standardocaml/opam-repository.gitfor Windows instead ofocaml-opam/opam-repository-mingw.git#sunset - Added version filter: Windows builds now require OCaml >= 4.13 (native opam 2.2+ requires official packages)
- MSVC filter: OCaml 5.0-5.2 excluded (MSVC support restored in 5.3)
src-opam/windows.ml:
ocaml_for_windows_package_exnnow returnsOcaml_version.Opam.V2.packagedirectly, using official package names (ocaml-base-compiler/ocaml-variants+options) instead of fdopen’s+mingw64/+msvc64naming
src-opam/opam.ml:
- Reduce parallelism on Windows to avoid OOM on unbound
make -j - Update Visual Studio to Windows 11 SDK
- create_switch adds
system-mingw/system-msvcfor all Windows versions (not just 5.x) setup_default_opam_windows_msvcpersists MSVC environment (PATH,INCLUDE,LIB,LIBPATH) with correctPATHordering: MSVC → Cygwin → Windows
PR 339 docker-base-images
src/pipeline.ml:
- Port package (
system-mingw/system-msvc) added for all Windows versions - Removed fdopen overlay addition (
maybe_add_overlayno longer called for Windows) - Removed
opam repo remove ocurrent-overlaystep - Changed
depexttoOptiontype - returnsNonefor Windows (opam 2.2+ has depext built-in) - Uses
opam_repository_masterfor Windows instead ofopam_repository_mingw_sunset
src/git_repositories.ml (implied by pipeline changes):
- Removed references to
opam_repository_mingw_sunsetandopam_overlays.