RetroPie running as a docker container on x86_64
-
Hi All.
I'm working in a little project of running RetroPie inside a container. I aware it is NOT supported, but I have decided to do this because
- My machine runs with strict Secure Boot and Luks configurations
- Not using Ubuntu as my desktop disto
- Dual-boot would be much of a pain because, additional data should be signed on my Secure Boot madness + my ESP partition is way too slim to hold boot data from other OS.
- RetroPie will provide me some nice "must have" like auto configuring Retroarch controllers when configuring input inside EmulationStation so, I don't have to bother configuring stuff in multiple places.
That's why I decided to try Docker. So far, this is the result: https://github.com/nwildner/retropie-docker
A dockerfile that builds RetroPie on top of the official Ubuntu 20.04 LTS image.
Just follow the instructions on the github page, and start the
cmd.sh
. Its implicit that you have to- Set the local ROMs dir
- Set the local BIOS dir
- Set the local retroarch autoconfiguration,ES config for user pi and ES config global dirs
- Have
docker
configured and installed on your host as well asxhost
.
-
-
@BuZz Thanks for the insights.
So far, no naming mismatch on both configuration files:
ES:
es_input.cfg - head </inputAction> <inputConfig type="joystick" deviceName="Xbox 360 Controller" deviceGUID="030000005e0400008e02000014010000">
Retroarch autoconfiguration:
Xbox 360 Controller.cfg (filename) input_device = "Xbox 360 Controller" input_driver = "udev"
Since this is a 8BitDo controller running on cable (Xbox 360 mode) I found the following attributes for udev:
ATTR{idProduct}=="028e" ATTR{idVendor}=="045e"
Converted to decimal and added them to the .cfg file for retroarch
head -4 retroarch_autoconfig/Xbox\ 360\ Controller.cfg input_device = "Xbox 360 Controller" input_driver = "udev" input_vendor_id = "1118" input_product_id = "654"
Didn't worked, unfortunately. Runcommand logs also don't provide a clue of what could be the problem.
pi@6eaf134e36b6:/dev/shm$ cat runcommand.log Parameters: Executing: /opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-snes9x/snes9x_libretro.so --config /opt/retropie/configs/snes/retroarch.cfg "/home/pi/RetroPie/roms/snes/Super Mario World (USA).zip" --appendconfig /dev/shm/retroarch.cfg Map_LoROMMap
Any additional ideas?
-
@nwildner if you launch with verbose logging via runcommand menu it will provide a lot more information.
-
Meanwhile, me and a friend kept investigating and, root cause found:
openat(AT_FDCWD, "/run/udev/data/c13:84", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/run/udev/data/+input:input2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
It seems that retroarch specifically reads these paths while EmulationStation does not require access to those to work.
Also, tried to revert to Ubuntu 22.04 LTS as base image to build mine because downgrading to 20.04 LTS was a vector of analysis, and the message of "unavailable vendor_id/product_id" on Retroarch notifications started so, the full solution was:
- Map
/run/udev/
to the container - Keep the image on Ubuntu 20.04 LTS for better compatibility with SDL2 issues.
I'll update the first post here because, while this is solved, it's a project that I will maintain here, and eventually try to fix any bugs that may come along with it.
- Map
-
Below my Docker experiments from a while back in case there might be anything useful there. Caveat emptor, it's been a while, and I haven't used these - at all; they worked ok, sort of, back in the day though.
-
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?
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.