I've made a first attempt at building an OCaml application into a Docker image using Openshift's source-to-image.
The result is kinda messy because of my poor understanding of the OCaml building and deploying process, but I think it could become promising if I keep digging.
The builder image is available here, and, to try it, here's a very simple echo server.
In particular, here is the problem I'm facing (there's a list in my README): he resulting image is far too big. As of now, my echo server on CentOS 7 weighs no less than 1.4GB!
This is due to the fact that the whole building environment is shipped with the image. This paragraph gives pointers to handle compiled langages with source-to-image, but I have no idea how to isolate the executable (and its possible runtime dependencies).
Any pointers to resources about this particular topic would be greatly appreciated. Besides, any feedback on this draft or this project is most welcome.