Online home | GitHub

cpollet.me

back to posts list

Docker hosts on gandi.net

Published on 20 Feb 2016

Ubuntu 14.04 LTS, raw Docker

Just follow the instructions at Docker:

$ apt-get update
$ apt-get install apt-transport-https ca-certificates
$ apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
$ echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" > /etc/apt/sources.list.d/docker.list
$ apt-get update
$ apt-get purge lxc-docker
$ apt-cache policy docker-engine
$ sudo apt-get install docker-engine
$ sudo service docker start
$ sudo docker run hello-world

Ubuntu 16.04 LTS, raw Docker

Just follow the instructions at Docker.

Debian 8, with Docker Cloud Agent

$ apt-get update
$ apt-get install -y curl htop
$ curl -Ls https://get.cloud.docker.com/ | sh -s {yourKey}

{youKey} comes from Docker Cloud

See as well Docker Cloud doc.

Move docker directory, Ubuntu/Debian

$ vi /etc/default/docker
DOCKER_OPTS="-g /somewhere/else/docker/"
  1. Stop docker: service docker stop. Verify no docker process is running ps faux
  2. Double check docker really isn’t running. Take a look at the current docker directory: ls /var/lib/docker/
  3. Make a backup: tar -zcC /var/lib docker > /mnt/pd0/var_lib_docker-backup-$(date +%s).tar.gz
  4. Move the /var/lib/docker directory to your new partition: mv /var/lib/docker /mnt/pd0/docker
  5. Make a symlink: ln -s /mnt/pd0/docker /var/lib/docker
  6. Take a peek at the directory structure to make sure it looks like it did before the mv: ls /var/lib/docker/ (note the trailing slash to resolve the symlink)
  7. Start docker back up: service docker start
  8. Restart your containers

source: https://github.com/docker/docker/issues/3127

Last generated on 18 Nov 2016