Dwarf Fortress Docker Linux Lazy Newb Pack LinuxLNP-0.44.09-r01
One very specific and mouse-trappy way to get Dwarf Fortress running in Docker on my host machine. Also shows how to get access to video acceleration for some apps.
docker build -t ubergarm/dwarf-fortress .
XSOCK=/tmp/.X11-unix
XAUTH=/tmp/.docker.xauth
xauth nlist :0 | sed -e 's/^..../ffff/' | xauth -f $XAUTH nmerge -
chmod 664 $XAUTH
docker run --rm -it \
-e DISPLAY \
-v $XAUTH:$XAUTH \
-v $XSOCK:$XSOCK \
-e XAUTHORITY=$XAUTH \
-v "$PWD"/save:/df/LinuxLNP-0.44.09-r01/df_linux/data/save \
--device /dev/nvidia0 \
--device /dev/nvidiactl \
--device /dev/nvidia-uvm \
--device /dev/snd \
--privileged \
ubergarm/dwarf-fortress
NOTE --privileged
and video devices are only needed for Dwarf Therapist
After getting into the container:
- Use PyLNP to set graphics etc, but don't launch, just exit
- Manually start Dwarf Fortress backgrounded e.g.
./df &
- Manually start Dwarf Therapist after your game is running
- remove unneeded dependencies
- figure out why launching from PyLNP crashes X - lol