I had the same idea, I am trying to run RetroPie on my Raspberry Pi with Debian 11 (I can't install RetroPie on Bullseye) on a Docker container, and I am using my iPad as a screen through Remote Desktop, and a Bluetooth controller (8Bitdo Zero 2), and I can use Emulationstation (my gamepad works fine there) but when I launch any game my controller doesn't work (I don't have a wired controller so I don't know if that's the problem). I've tried to change the retroarch controller configuration and changing it to "sdl2" only works one button... I don't know why. If you don't have any issues maybe I could try your Dockerfile because it might be my setup?