Comment by skydhash
You need to share the wayland socket (how programs talk to the compositor) with the container in docker. I’ve seen a script that does that on GitHub but I can’t remember the name. Distrobox and Toolbx also does this, but they also share your home directory with the container because that’s where all your config are.