Running Docker on Raspberry Pi in 5 minutes

Docker support for Raspberry Pi was introduced for the first time in 2016 with 1.12 release. . With Docker v1.12.1 release, a FIRST ARM debian package was officially made available. In case you are wondering what it actually means? – If you have Raspberry Pi box and microSD card loaded with Raspbian OS inserted into Pi box, all you need is to power-on your Pi box and run “`curl -sSL https://get.docker.com/ | sh “` to get the latest Docker 1.12.1 running on your Raspbian/Jessie Linux OS. Amazing, isn’t it?

If you still don’t believe me, here is a 5 minute guide for getting Docker 1.12.1 running on your Raspberry Pi 3.I assume you have the following minimal list of hardware & software ready with you.

14117817_10208347498098315_7577435330162790622_n

Hardware:

  1. Raspberry Pi 3 ( You can order it from Amazon in case you are in India for $35)
  2. Micro-SD card reader ( I got it from here )
  3. Any Windows or Linux Desktop or Laptop
  4. HDMI cable ( I used the HDMI cable of my plasma TV)
  5. Internet Connectivity(Wifi/Broadband/Tethering using Mobile) – to download Docker 1.12.1 package
  6. Keyboard & mouse connected to Pi’s USB ports

1

                                                                                            Source~http://www.rlocman.ru/i/Image/2016/02/29/RaspberryPi_3_1.jpg

Software:

  1. SD-Formatter – to format microSD card
  2. Win32 disk imager(in case you have Windows OS running on your laptop) – to burn Raspbian Jessie ISO into microSD card

Steps:

  1. Format the microSD card using SD Formatter as shown below:

4

2. Download Raspbian Jessie OS from here and use Win32 imager(in case you are on Windows OS  running on your laptop) to burn it on microSD card.

Win32

3. Insert the microSD card into your Pi box. Now connect the HDMI cable  from one end of Pi’s HDMI slot to your TV or display unit and mobile charger(recommended 5.1V@1.5A) as shown:


23

RaspbainOS

Wow ! the Raspbian OS is up and running. By default, the username is pi and password is raspberry. I installed vncserver and could connect to Raspberry Pi’s while sitting on my sofa 🙂

10

Now it’s time to just run the one line command:

       $curl -sSL https://get.docker.com/ | sh

11

Start the docker service through the below command:

pi@raspberry6:~ $ sudo systemctl start docker.service
Warning: Unit file of docker.service changed on disk, ‘systemctl daemon-reload’ recommended.

Yipee ! You just got Docker 1.12.1 running on your amazing Pi box.

345

It just took 2 minutes for getting Docker 1.12.1 ready right from connecting the power supply and booting up my own Raspberry Pi 3 box. I was able to pull dozens of ARM based images from Dockerhub and it just works flawlessly. Amazed ! Impressed !

As I ordered for 2x Raspberry Pi , I want to try out Swarm Mode quickly.

14100423_10208347499138341_3718483022828872551_n

Let’s try the Swarm Mode:

12

It was too easy to connect the worker node to the manager over the WLAN and the cluster is ready:

13

As I have just two Pi boxes, I couldn’t go further to test the Swarm Mode, though I am excited to run applications on this Swarm Mode cluster. I am planning to order for 2 more Pi’s soon so that I can test drive applications.

Meanwhile, I would suggest to refer the below links in case you are interested to see what’s happening in Docker space on Pi box.

Please follow and like us:
0

Leave a Reply to Anonymous Cancel reply

Your email address will not be published. Required fields are marked *