Ocaml repl and/or utop port

Does anyone know what port the ocaml repl or utop repl runs on? I am trying to build docker containers where the ocaml repl reside on one container and the jupyter server in another container.

This is an experiment to see whether building containers in this fashion will be easier than combining the repl and jupyter into one container.

Thanks.

I’m confused by this question, because to my knowledge the REPLs are not networked services, they dynamically compile and execute the code they are given, within their own process.

In the case of Jupyter, they are.

That said, I don’t quite understand the question either, since it is the OCaml kernel which initiates the connection, using (5?) ports opened at random by the Jupyter server. So, you will not know beforehand which ports to enable.

I suppose you could put a proxy OCaml kernel in the Jupyter image. It would intercept the “connection file” from Jupyter and use it to enable the corresponding ports of the container containing the actual kernel on the fly (or even to start it).

Thank you for your respond. Perhaps I am mistaken about how ocaml kernel connected to jupyter. I had assumed that ocaml kernel exposes a port which allowed Jupyter to connect to. If that’s not the case, then I would not be able to split the 2 processes (ocaml and jupyter) into difference container. It was worth a try.