The following is a very basic intro to running applications inside Docker containers on a Raspberry Pi, intended for someone who has never used Docker before, but wants to try it out. This was also my first step into Docker on Pi, so I documented it as I went along.
There are a few different tutorials out there for installing Docker on a Raspberry Pi. I found this one works well, and follows the same basic instructions as is recommended for installing Docker on a Linux PC.
These are the commands I ran on the Pi (in case that site disappears):
sudo apt-get install apt-transport-https \ ca-certificates \ software-properties-common
curl -fsSL https://yum.dockerproject.org/gpg | sudo apt-key add -
apt-key fingerprint 58118E89F3A912897C070ADBF76221572C52609D
sudo add-apt-repository \ "deb https://apt.dockerproject.org/repo/ \ raspbian-$(lsb_release -cs) \ main"
echo "deb https://apt.dockerproject.org/repo/ raspbian-jessie main" | sudo tee -a /etc/apt/sources.list
sudo apt-get -y install docker-engine
You can test that it’s working with the following command:
sudo docker run hello-world