1.2 Installation of Docker in Raspbian in 4 steps

https://github.com/umiddelb/armhf/wiki/Get-Docker-up-and-running-on-the-RaspberryPi-(ARMv6)-in-four-steps-(Wheezy)

This tutorial describes useful things if you want to set up and run Docker on your RaspberryPi from scratch. If you prefer a ready to use image you may want to read this article and take the image provided by the Hypriot team. As always some people feel better if they can do the set up by themselves and don't need to trust other people's images. If you belong to this particular group you may want to continue reading.

1. Clean the official Raspbian image to get a Raspbian Server

The official Raspbian comes with a lot of packages pre-installed, many of them don't make sense if you want to run the Raspberry Pi as a server (e.g. without a display attached). The following commands remove the packages that are not necessary.

$ sudo apt-get -y remove `sudo dpkg --get-selections | grep -v "deinstall" | grep x11 | sed s/install//`
$ sudo apt-get -y remove `sudo dpkg --get-selections | grep -v "deinstall" | grep python | sed s/install//`
$ sudo apt-get -y remove `sudo dpkg --get-selections | grep -v "deinstall" | grep sound | sed s/install//`
$ sudo apt-get -y remove `sudo dpkg --get-selections | grep -v "deinstall" | grep gnome | sed s/install//`
$ sudo apt-get -y remove `sudo dpkg --get-selections | grep -v "deinstall" | grep lxde | sed s/install//`
$ sudo apt-get -y remove `sudo dpkg --get-selections | grep -v "deinstall" | grep gtk | sed s/install//`
$ sudo apt-get -y remove `sudo dpkg --get-selections | grep -v "deinstall" | grep desktop | sed s/install//`
$ sudo apt-get -y remove `sudo dpkg --get-selections | grep -v "deinstall" | grep gstreamer | sed s/install//`
$ sudo apt-get -y remove `sudo dpkg --get-selections | grep -v "deinstall" | grep avahi | sed s/install//`
$ sudo apt-get -y remove `sudo dpkg --get-selections | grep -v "deinstall" | grep dbus | sed s/install//`
$ sudo apt-get -y remove `sudo dpkg --get-selections | grep -v "deinstall" | grep freetype | sed s/install//`
$ sudo apt-get -y autoremove
$ sudo apt-get clean

2 Update to Debian 8 (Jessie)

Debian 8 for the Raspberry Pi already comes with a Docker enabled kernel, but you have to run the update on your own (there is no ready to use Debian 8 image available for download at this time):

$ sudo sed -i 's/wheezy/jessie/' /etc/apt/sources.list
$ sudo sed -i 's/wheezy/jessie/' /etc/apt/sources.list.d/raspi.list 
$ sudo apt-get update && sudo apt-get -y upgrade # answer 'y' to upcoming questions 
$ sudo sudo apt-get -y dist-upgrade # answer 'y' to upcoming questions
$ sudo init 6
$ sudo apt-get -y autoremove
$ sudo apt-get -y purge $(dpkg -l | awk '/^rc/ { print $2 }')
$ sudo init 6

3 Build the Docker installation package (optional)

The Hypriot team has made a great job, automating the process of building a raspbian wheezy package for Docker, with Docker on ARM. Any docker enabled ARMv7 device will work as well. If you don't have any, you may take a look at Scaleway, they offer AWS like services based on ARMv7:

$ git clone https://github.com/hypriot/rpi-docker-builder.git
$ cd rpi-docker-builder
$ sudo sh build.sh
$ sudo sh run-builder.sh

You will find the docker install package (most recent version is 1.10.3-1) in ./dist/docker-hypriot_1.10.3-1_armhf.deb

If you want to run a particular Docker version, you can use the Docker Builder by the Hypriot team:

4 Install the docker installation package on your Raspberry Pi

The Hypriot team offers the installation package for download now, you don't need to create the installation package by yourself:

$ curl -sSL http://downloads.hypriot.com/docker-hypriot_1.8.1-1_armhf.deb >/tmp/docker-hypriot_1.8.1-1_armhf.deb
$ sudo dpkg -i /tmp/docker-hypriot_1.8.1-1_armhf.deb
$ rm -f /tmp/docker-hypriot_1.8.1-1_armhf.deb
$ sudo sh -c 'usermod -aG docker $SUDO_USER'
$ sudo systemctl enable docker.service

See if it works:

$ sudo docker info
...
$ docker version
...

And run a container of a Raspbian bare bones image:

$ docker run -i -t resin/rpi-raspbian