How to run a wxPython Phoenix GUI as a docker image?

I would like to dockerize a GUI written with wxPython Phoenix.

I understand this would require to send the address of the host’s X server to the docker image that would then set up wxPython Phoenix framework but that’s all pretty obscure to me.

Source: StackOverflow