All Projects → bencawkwell → dockerfile-dwarffortress

bencawkwell / dockerfile-dwarffortress

Licence: Unlicense license
Dwarf Fortress in a container

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to dockerfile-dwarffortress

kali-desktop
🐳 Kali Linux desktop running in Docker on any operating system, in your web browser or a VNC client, with Kali top10 tools pre-installed.
Stars: ✭ 72 (+242.86%)
Mutual labels:  novnc
dwarlixir
A dwarf-fortress clone / MUD / side project in Elixir
Stars: ✭ 46 (+119.05%)
Mutual labels:  dwarf-fortress
docker-novnc
tigervnc, websokify, novnc and Nginx with s6-overlay in a docker image.
Stars: ✭ 31 (+47.62%)
Mutual labels:  novnc
Docker Android
Android in docker solution with noVNC supported and video recording
Stars: ✭ 4,042 (+19147.62%)
Mutual labels:  novnc
websockify-nginx-module
Embed websockify into Nginx (convert any tcp connection into websocket)
Stars: ✭ 132 (+528.57%)
Mutual labels:  novnc
pojde
Develop from any device with a browser.
Stars: ✭ 60 (+185.71%)
Mutual labels:  novnc
iCtrl
UofT Engineering Lab Remote
Stars: ✭ 91 (+333.33%)
Mutual labels:  novnc
noxfutura
Nox Futura is a Rust port of the C++ project of the same name. It's a Dwarf Fortress like, in 3D (and a futuristic setting). It's also a passion project, so I'm not expecting formalized release dates!
Stars: ✭ 98 (+366.67%)
Mutual labels:  dwarf-fortress
ubuntu-desktop-jp
日本人向けのUbuntuデスクトップ環境のDockerイメージです。
Stars: ✭ 62 (+195.24%)
Mutual labels:  novnc
ubuntu-vnc-xfce-g3
Headless Ubuntu/Xfce containers with VNC/noVNC (Generation 3)
Stars: ✭ 83 (+295.24%)
Mutual labels:  novnc
Novnc
VNC client web application
Stars: ✭ 8,269 (+39276.19%)
Mutual labels:  novnc
CrownLabs
Kubernetes-based Remote Laboratories
Stars: ✭ 96 (+357.14%)
Mutual labels:  novnc
easy-novnc
Single-binary noVNC instance, web UI, and multi-host proxy.
Stars: ✭ 142 (+576.19%)
Mutual labels:  novnc
Websockify
Websockify is a WebSocket to TCP proxy/bridge. This allows a browser to connect to any application/server/service.
Stars: ✭ 2,942 (+13909.52%)
Mutual labels:  novnc
ubuntu-vnc-xfce-chromium
Retired. Headless Ubuntu/Xfce container with VNC/noVNC and Chromium (Generation 1)
Stars: ✭ 20 (-4.76%)
Mutual labels:  novnc
ubuntu-vnc-xfce
Headless Ubuntu/Xfce containers with VNC/noVNC (Generation 1)
Stars: ✭ 51 (+142.86%)
Mutual labels:  novnc
soulseek-docker
🐳 Soulseek Over noVNC Docker Container
Stars: ✭ 149 (+609.52%)
Mutual labels:  novnc
df-structures
Dwarf Fortress data structure descriptions
Stars: ✭ 80 (+280.95%)
Mutual labels:  dwarf-fortress
name-needed
🕹 A one man effort to produce an open source, intuitive and high performance Dwarf Fortress-esque game. Needs a name.
Stars: ✭ 87 (+314.29%)
Mutual labels:  dwarf-fortress
ubuntu-vnc-xfce-firefox
Retired. Headless Ubuntu/Xfce containers with VNC/noVNC and Firefox (Generation 1)
Stars: ✭ 20 (-4.76%)
Mutual labels:  novnc

dockerfile-dwarffortress

Dwarf Fortress in a container. Tested on Mint 17.

Configuring

Edit the Dockerfile under the section "Run each playbook" by commenting or uncommenting each line. Hopefully that section is self explanatory.

Building

Make sure you are in the same directory as the Dockerfile

cd dockerfile-dwarffortress

Build the image and tag it dwarffortress.

docker build -t dwarffortress .

Running

There are a few options, which depend on which playbooks have been uncommented in the Dockerfile:

X11

Run in the X session on the host. Before using this method you may need to run the following on the host to permit access to the X session from within a docker container:

xhost +local:docker

To start dwarf fortress in the container with sound on your hosts display:

docker run -t -i -e DISPLAY=unix$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v /dev/snd:/dev/snd --lxc-conf='lxc.cgroup.devices.allow = c 116:* rwm' dwarffortress

noVNC

This allows you to connect and control Dwarf Fortress using a web browser. Since it requires a specific port you would run the container using the command:

docker run -t -i -p 6080:6080 dwarffortress

If you also included dfhack then the dfhack console should be right in front of you. You can then access the game by visiting http://localhost:6080/vnc.html in your browser and click "connect" (there is no password).

XPRA

This mode allows you to remotely run Dwarf Fortress but within a window as if it was running locally. Unfortunately this is the most complicated method and has some quirks to work around, for example:

  • You must use the latest version of XPRA to connect, the version normally available through the package managers is out of date, instead get the latest version from https://winswitch.org.
  • DO NOT USE FULLSCREEN, it will result in really high load, I suspect this is because Dwarf Fortress tries to scale to fit the window, and fullscreen in XPRA reports this in a quirky way.
  • DO NOT PROVISION NOVNC, since that playbook already sets up an instance of Xvfb on DISPLAY 1, so the xpra process fails to start.
  • The only reliable encoding I have found to work is "Raw RGB + zlib".

Since XPRA uses SSH, you need to bind port 22 to the host, so run the docker container using:

docker run -t -i -p 2222:22 dwarffortress

If you included dfhack then the dfhack console will appear. You can use xpra to connect using the command:

xpra attach --encoding=rgb --ssh="ssh -p 2222" ssh:df@localhost:100

The password is "changeme".

TEXT mode

By far the simplest method, but you loose out on a dfhack console, and using a tile set. There is not special ports required since Dwarf Fortress is just controlled from the console you run the container.

Saved Games

If you do not specify a way to save the game, quitting DF will lose your game.

The easiest way to keep your saved games between container restarts is to use dockers -v option to map a directory on your host to the save directory inside the container. The following example will mean any saves you make in the game will end up in the directory /tmp/save:

docker run -i -t -v /tmp/save/:/df_linux/data/save/ dwarffortress

Remember to make the directory readable and ensure it has plenty of disk space, since there is a known issue in Dwarf Fortress that it will pretend to save successfully even if it has not.

Saved Games and changing tile set

Assuming you use volume mapping to store saved games, you may choose to rebuild the container with a different tile set configured. After you have rebuilt you will need to trigger an update to your saved files:

docker run -i -t -v /tmp/save/:/df_linux/data/save/ dwarffortress --update-saves

Launch options

Some settings in init.txt can be changed by passing options, for example to skip the intro:

docker run -t -i dwarffortress --skip-intro

To see the full list of possible options:

docker run -t -i dwarffortress --help

Troubleshooting

setarch: i386: Unrecognized architecture when running container

If you happen to be running docker with seccomp enabled, then docker prohibits some system calls that are unfortunately required. The simplest workaround is to run docker without the default seccomp security profile:

docker run -t -i --security-opt seccomp=unconfined dwarffortress

More information about seccomp security profiles for docker can be found at: https://docs.docker.com/engine/security/seccomp/#/passing-a-profile-for-a-container

Todo

  • Fix sound.
  • Perhaps wait for user feedback before starting DF so that you can connect first so you do not miss the awesome intro!
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].