Graphical IDE in dockers

I don’t know if this is the right place for this question…

Is it possible to have ocaml and an IDE (emacs or Visual Studio Code) running with graphical interface running in a container (docker or similar)? Is this possible or is a weird idea?

If I should ask about this elsewhere, please kindly point me in the right direction.

A colleague of mine was able to do it. If I remember correctly he was doing something like this https://linoxide.com/linux-how-to/run-gui-apps-docker-container/ and was having the full opam environment in the container, only the sources mounted locally

It’s probably possible to run this (reason-language-server or ocaml-language-server) in a container.

I will try.

Thanks a lot.