Start Erlang's Dialyzer With GUI From A Docker Container
I use Docker mostly when working on software projects and I figured out how to get Erlang’s Dialyzer GUI working in a Docker container.
Start a container with X11 forwarding:
$ docker run -it --rm --net=host -e "DISPLAY" -e "NO_AT_BRIDGE=1" \ -v "$XAUTHORITY:/root/.Xauthority:rw" elixir bash
Build “the recommended minimal PLT for Erlang/OTP”:
# dialyzer --build_plt --apps erts kernel stdlib mnesia Creating PLT /root/.cache/erlang/.dialyzer_plt ... ... done (warnings were emitted)
Start the Dialyzer GUI:
From the command line:
# dialyzer --gui
From inside an IEx session:
Start the Dialyzer application:
(1)> Application.load(:dialyzer) iex:ok
Start the Dialyzer GUI:
(2)> :dialyzer.gui() iex
You should now see the Dialyzer GUI.