2 min read

I still had a bunch of Raspberry Pi2 not doing anything for a while.
So I started a new Project to run a little cluster of Raspberry's

my goal is to run most of my docker containers I use on a daily base of the Pi.

we start with a fresh rasbian-lite image.

First we update all the Pi's in the cluster:

sudo apt update && sudo apt dist-upgrade -y

Install Docker:

sudo apt-get install apt-transport-https ca-certificates software-properties-common -y
curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh
sudo usermod -aG docker pi
sudo curl https://download.docker.com/linux/raspbian/gpg , sudo apt-key add -

sudo nano /etc/apt/sources.list

Add the following line and save:  

deb https://download.docker.com/linux/raspbian/ stretch stable

Update and start the services:

sudo apt-get update
sudo apt-get upgrade

systemctl start docker.service
systemctl enable docker.service

docker info

Create the swarm on 1 node:

docker swarm init

on the rest of the node join the swarm.

Have fun ;)