Fix wolf.sh: mount whole retroarch/ dir, not just its subdirectories

The esde and retroarch app profiles (both CATALOG dict copies) mounted
three subdirectories individually:

  {games}/retroarch/cores:/home/retro/.config/retroarch/cores:rw
  {games}/retroarch/shaders:/home/retro/.config/retroarch/shaders:rw
  {games}/retroarch/overlays:/home/retro/.config/retroarch/overlays:rw

but never mounted /home/retro/.config/retroarch itself. Docker
auto-creates that missing parent directory inside the container as
root:root mode 755 (standard behavior for a bind-mount target that
doesn't already exist in the image) — the retro user (uid 1000) can
read/traverse it but not write into it. RetroArch's own entrypoint
then fails outright trying to write its default config there:

  cp: cannot create regular file '/home/retro/.config/retroarch/retroarch.cfg': Permission denied

which happens on every single launch, for both apps — confirmed live
against a real box: the container starts, RetroArch dies on that cp
within ~1s, and Wolf tears the session down (the "black screen, back
to app grid" symptom, with nothing RetroArch-specific about it).

Fix: mount the parent {games}/retroarch directory itself onto
/home/retro/.config/retroarch instead of three separate subdirectory
mounts. cores/shaders/overlays already lived as the only subdirectories
under {games}/retroarch/ on the host, so this preserves the exact same
container-side paths — but now the parent is a real bind mount with no
auto-created stub in the way, and RetroArch's other generated config
(button remaps, core options, playlists, cheats, etc.) persists across
sessions too, which the old three-mount setup silently discarded.
This commit is contained in:
Claude
2026-08-31 20:09:33 +00:00
parent 3ffcde7294
commit 76a494bcbf
+4 -12
View File
@@ -1310,9 +1310,7 @@ CATALOG = {
f'{games}/saves:/mnt/games/saves:rw',
f'{games}/media:/media:rw',
f'{games}/bios:/home/retro/bioses:rw',
f'{games}/retroarch/cores:/home/retro/.config/retroarch/cores:rw',
f'{games}/retroarch/shaders:/home/retro/.config/retroarch/shaders:rw',
f'{games}/retroarch/overlays:/home/retro/.config/retroarch/overlays:rw',
f'{games}/retroarch:/home/retro/.config/retroarch:rw',
f'{games}/emulators:/mnt/games/emulators:rw',
f'{games}/emulators:/home/retro/Applications:rw'],
env=STD_ENV, cap_add=STD_CAP, security_opt=[], ipc_mode='host',
@@ -1336,9 +1334,7 @@ CATALOG = {
mounts=[f'{games}/roms:/ROMs:rw',
f'{games}/saves:/mnt/games/saves:rw',
f'{games}/bios:/home/retro/bioses:rw',
f'{games}/retroarch/cores:/home/retro/.config/retroarch/cores:rw',
f'{games}/retroarch/shaders:/home/retro/.config/retroarch/shaders:rw',
f'{games}/retroarch/overlays:/home/retro/.config/retroarch/overlays:rw'],
f'{games}/retroarch:/home/retro/.config/retroarch:rw'],
env=STD_ENV, cap_add=STD_CAP, security_opt=[], ipc_mode='host',
ulimits=[], privileged=False,
),
@@ -2598,9 +2594,7 @@ CATALOG = {
f'{games}/saves:/mnt/games/saves:rw',
f'{games}/media:/media:rw',
f'{games}/bios:/home/retro/bioses:rw',
f'{games}/retroarch/cores:/home/retro/.config/retroarch/cores:rw',
f'{games}/retroarch/shaders:/home/retro/.config/retroarch/shaders:rw',
f'{games}/retroarch/overlays:/home/retro/.config/retroarch/overlays:rw',
f'{games}/retroarch:/home/retro/.config/retroarch:rw',
f'{games}/emulators:/mnt/games/emulators:rw',
f'{games}/emulators:/home/retro/Applications:rw'],
env=STD_ENV, cap_add=STD_CAP, security_opt=[], ipc_mode='host',
@@ -2624,9 +2618,7 @@ CATALOG = {
mounts=[f'{games}/roms:/ROMs:rw',
f'{games}/saves:/mnt/games/saves:rw',
f'{games}/bios:/home/retro/bioses:rw',
f'{games}/retroarch/cores:/home/retro/.config/retroarch/cores:rw',
f'{games}/retroarch/shaders:/home/retro/.config/retroarch/shaders:rw',
f'{games}/retroarch/overlays:/home/retro/.config/retroarch/overlays:rw'],
f'{games}/retroarch:/home/retro/.config/retroarch:rw'],
env=STD_ENV, cap_add=STD_CAP, security_opt=[], ipc_mode='host',
ulimits=[], privileged=False,
),