I use docker as a tool for daily job. Instead of installing node.js, I use docker images as short-living containers, to use tools like node and npm. I mount my local directory into the container, and then run it, and let the software from container do its job. I have many different local directories, each used with the same image/container, to manage a different project.
My question is simple: can this model be also used to work with OCaml and Opam?
So far, I have found the docker image ocaml/opam, but I haven’t figure out how to setup development environment in my local directory, that could be reused every time when the container is started and the directory is mounted inside the container.