Author Topic: Docker images for hosting on Linux  (Read 832 times)

After reading about some of the problems people have (and having some myself too) regarding hosting Blockland on Linux, I decided to make a Docker image for it. A Docker container is basically like a virtual machine, except it completely shares the system resources (no more special partitions or disk images where you have to preallocate space), they share the system kernel (meaning less resource and memory usage), they can be based on other images (which share storage space thanks to copy-on-write), that they have predesignated entry points running a single application instead of the whole system, and that they can be built easily in a scriptable fashion (Dockerfiles). Oh, and there is a pretty huge registry of prebuilt images for all sorts of purposes.

What does this give over hosting the instances normally?
1) Simplicity. Start an instance with a single command.
2) Standard environment. It's easier to give support if we know your instance is exactly the same as everyone else's (or at least that you can easily package up your changes so other people can inspect them on their own systems).
3) Save space. Each instance only consumes the hard-drive space that the settings and add-ons require. Everything else is shared for everybody, though instance A can never under any circumstances impact instance B.
4) Authentication just works!
5) Your containers automatically get cute names like nostalgic_bohr!
6) Resources are fairly-ish shared so one instance can't hog all of the CPU for itself (yes, systemd provides this out of the box too, but that isn't the default on either Ubuntu or Debian yet).

How big is the image?

1.2GB, but note that this only applies once, not for each instance or each server you host, contrary to ordinary hosting. Also, about 200MB of this is shared between all Docker Ubuntu 13.10 images.

How do I run it?
Install Docker (if you haven't already), then run (remember sudo if you're not already root)

Code: [Select]
# docker run -i -t -P teozkr/blockland

This should create and start the Blockland instance, as well as give you access to it's console.

How do I update it?

Code: [Select]
# docker pull teozkr/blockland

What I wanted to know wasn't listed here!
Have a look at the GitHub repo.
It's a trusted repository on the Docker Index, which means that Docker Inc has ran the Dockerfile and produced the VM, not the potentially lying me.
« Last Edit: March 17, 2014, 07:15:57 PM by DontCare4Free »

So how did you get authentication to work?

So how did you get authentication to work?
As it turns out, Blockland just wants a X server to be running in order to authenticate for whatever godforsaken reason. Wrapping the process in xvfb (basically creates a dummy display) causes it to work fine.
« Last Edit: March 17, 2014, 02:33:07 PM by DontCare4Free »