For testing purpose, you may want to install a Docker server on an OVH VPS. This short article explain you how to make Docker running on a VPS with an Ubuntu 14.04 system (this may be the same for Debian users).
First of all, as we need to use an official kernel, do not use VPS Classic. Only the VPS Cloud that is running on VMWare let you use another kernel instead of there customized one.
Update your kernel
The first thing to do is to install the default Linux kernel and its extra that enable the AUFS storage driver. Else, Docker will use devicemapper that don't works well on these VPS.
$ apt-get install linux-image-extra-virtual
After installing that new kernel, we need to replace the OVH kernel order in the grub boot sequence to use the newly installed kernel first.
$ mv /etc/grub.d/06_OVHkernel /etc/grub.d/25_OVHkernel $ update-grub
Reboot your VPS from the command or the manager. Then, you can check the AUFS support, the
docker info result should contain:
$ docker info [...] Storage Driver: aufs Root Dir: /var/lib/docker/aufs Dirs: 0 [...]
Fix DNS resolution
When trying to launch a container, you should have the same error as bellow.
# docker run -t -i ubuntu /bin/bash Unable to find image 'ubuntu:latest' locally Pulling repository ubuntu FATA Get https://index.docker.io/v1/repositories/library/ubuntu/images: dial tcp: lookup index.docker.io: no DNS servers
The simple reason is that your
/etc/resolv.conf file is empty, there's no configured DNS servers. I recommend you to remove these packages and set the
resolv.conf file manualy:
aptitude remove bind9 resolvconf
/etc/resolv.conf, copy/paste these nameservers definitions or use your own, we just need this file to be filled.
nameserver 127.0.0.1 nameserver 126.96.36.199 nameserver 188.8.131.52
Now, you should be able to run any Docker container on your VPS !