How to run GUI apps in containiers in osx? (docker for mac)

Start XQuartz (open -a Quartz) before running your container, you may have to enable the option Security/Allow connections from network client. After that you can run your container and make sure that you have /tmp/.X11-unix mounted.

I am able to get Webstorm run in native Docker container this way.

It is very strange that socket forwarding works for you on macOS. I wasn’t able to use it on macOS because of this issue: Support for sharing unix sockets · Issue #483 · docker/for-mac · GitHub

As far as I know, even with the latest Docker, it’s not possible to do this type of thing without using Xquartz.

See https://hub.docker.com/r/kayvan/scidvspc/ for an example GUI chess database app.

Same here. That’s why I have to use the kludgy “socat” workaround for macOS.

Any way to forward sound from a container to a macOS host? I can use the “–device /dev/snd” in Linux, but not on macOS.