/docker_rpi3_node_iot_led

Raspberry Pi 3 IOT Demo using Docker & Node JS to trigger an LED

Primary LanguageJavaScriptMIT LicenseMIT

Raspberry Pi 3 IoT Demo using Docker & NodeJS to trigger an LED

The Dockerfile in the repository can be used to build an IoT demo container that runs a NodeJS application that will work with the GPIO pins configured to match the following setup :

rpi3-led_bb

rpi3-led_schem

The docker image can be found here: https://hub.docker.com/r/allthingscloud/rpi3-node-iot-led/

Demo application thanks to - https://www.w3schools.com/nodejs/nodejs_raspberrypi_blinking_led.asp

To build the dockerfile on a raspberry pi 3 after cloning this repository:

docker image build --tag allthingscloud/rpi3-node-iot-led -f Dockerfile . 

Launch as follows:

docker container run -d --name my-node-iot-demo --privileged allthingscloud/rpi3-node-iot-led

Similar golang and python docker images can be found in my github repos - https://github.com/allthingsclowd

Raspberry Pi 3 - Docker Installation

Please check the official documentation at https://docs.docker.com

I used the following steps :

sudo apt-get update

sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    software-properties-common
	
curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88

echo "deb [arch=armhf] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") \
     $(lsb_release -cs) stable" | \
    sudo tee /etc/apt/sources.list.d/docker.list   
   
sudo apt-get update

sudo apt-get install docker-ce