HTTPS SSH
Build-instructions (presuming ubuntu/mint/debian):

1. Clone this repository. git clone https://TZer0@bitbucket.org/TZer0/crawl-docker.git
2. Make sure that you are running a kernel newer than 3.8 - run uname -a. Don't confuse 3.1x with 3.1.x.
3. Edit settings.rc to fit your storage-locations. Remember that VERSIONSDB_VOLUME is a file, not a folder.
4. sudo apt-get install apparmor
5. Install docker: (Ubuntu/Mint) https://docs.docker.com/installation/ubuntulinux/ 
(Debian) https://docs.docker.com/installation/debian/
6. Edit The section that says #Configure here in the Dockerfile.
7. Run build.sh. The last command should end with "Successfully built".
8. Run run.sh. This starts a shell inside the Docker container.
9. Inside the docker: /utils/postbuild.sh

You are now running inside the docker, you may now test webtiles and more once postbuild.sh finishes.
Remember that there is no chroot, so the webserver is located in /crawl-master/webserver

To start both webtiles and dgamelaunch, execute the following inside the docker:

```
#!bash
/utils/launch.sh

```

To connect to webtiles, connect to localhost:8080 in a browser.

To connect using ssh, use the following on your host machine:

```
#!bash
ssh terminal@localhost -p 2222

```

Once the webtiles-server is launched, it should be available at localhost:8080 in your host machine. To see if it is running, run top. If it is not running, try editing daemon = False in /crawl-master/webserver/config.py and run the command again.

The numbers you see below on bitbucket most likely do not correspond to the numbers in the README

TODO:

7. Testing.
10. Modify dgamelaunch-config. The idea is to transition to automated config/menu-generators and game-binary-setup based on database tables. This will simplify the design of the docker significantly and make modification of the server an easier task. The idea is that adding/removing a game branch should be an easy command-line task.

DONE/CLOSED:

1. ssh-access.
3. Using external volumes for storing saves, passwords, dumps, compiled crawl-binaries and replays.
4. Applying version-settings from the Dockerfile properly to all of the config.
5. (check!!) Find and replace all instances of cszo and other server-specific things.
2. Rebuild-trigger. (waiting for #10)
6. Auto-rebuilds (cron). (waiting for #10)
8. Move parts of the process to be run from inside the docker if they rely on host-mounted volumes.
9. Tweak menus/available version settings. (CLOSED, see #10)


NOTES:

chmod u+s needs to be run from within the Docker.