The 30-minute Discourse installation guide assumes you'll be using Digital Ocean and makes no mention of an important requirement for Docker:
If you use another hosting provider, you should really make sure that a Linux kernel feature called "AUFS" is supported. Docker not using AUFS can cause terrible pain.
If you want to use Linode, here's how to enable AUFS support in Ubuntu (for other OSes, refer to Linode's guide and update the instructions below accordingly:
- Create the Linode and pick Ubuntu 14.04 LTS
- Resize the main disk down to allow for a larger swap partition than the default 512MB. For example, for the $10 Linode 1024, resize the main partition to 22528MB, then resize the swap partition to 2048MB.
- SSH into the VPS and run the following commands while remaining root:
sudo apt-get update
apt-get install -y linux-image-virtual grub2 mc htop
- Optional: run
htop and confirm the swap is 2048MB
- Choose the main disk for Grub to boot from, if asked
mcedit /etc/default/grub and match the config to these settings:
GRUB_SERIAL_COMMAND="serial --speed=19200 --unit=0 --word=8 --parity=no --stop=1" was present in the guide, but I didn't find it to be necessary]
- Save and run
- In your Linode’s Dashboard, Click on Edit under the Configuration Profiles section.
- In the Boot Settings section, select GRUB 2 from the Kernel drop down menu
- Save changes and reboot.
- SSH in again and run these commands (credit Peter Parente):
apt-get -y install linux-image-extra-$(uname -r)
sh -c "wget -qO- https://get.docker.io/gpg | apt-key add -"
sh -c "echo deb http://get.docker.io/ubuntu docker main\ > /etc/apt/sources.list.d/docker.list"
apt-get -y install lxc-docker
- Confirm that you have AUFS support by running
docker info. You should not see
- Continue with the Discourse installation guide, starting with "Install Discourse" (since you have already installed Docker).
Disclaimer: I don't exactly understand everything that's going on here, but I've just performed these steps, and they've worked for me. Here's Docker using AUFS:
root@localhost:/var/discourse# docker info
Server Version: 1.9.1
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirperm1 Supported: false
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 3.13.0-77-generic
Operating System: Ubuntu 14.04.1 LTS
Total Memory: 993.9 MiB
Note that this method of installing Docker might not add it to the startup script. I found that was fixed by launching the app and rebooting the Linode later.