SlideShare a Scribd company logo
1 of 30
Download to read offline
PROGRAMMING IOT
WITH DOCKER:
HOW TO START?
Mohd Syukor Abdul
Open Source Community
19 May 2017
Agenda
2
 What is IoT?
 What is Docker?
 Programming IoT with Docker?
What is IoT?
3
 https://www.postscapes.com/internet-of-things-award/open-source/
What is IoT? (cont.)
4
 According to Gartner, the Internet of Things will balloon to
26 billion devices by 2020.
 There’s big money in these little devices: Gartner projects
IoT will result in $1.9 trillion in global economic “value-
add”—the combined benefits that businesses derive through
the sale and usage of IoT technology.
 http://www.gartner.com/newsroom/id/2636073
5
 In Malaysia: National Internet of Things (IoT) Strategic Roadmap
(http://mimos.my/iot/roadmap2.html)
What is IoT? (cont.)
6
 IoT Boards:
… and much more !!!
What is IoT? (cont.)
7
 IoT Sensors:
… and much more !!!
What is IoT? (cont.)
8
 IoT Gateways:
… and much more !!!
What is IoT? (cont.)
9
IoT Platform:
In simple words the purpose of any IoT device is to connect
with other IoT devices and applications (cloud-based mostly)
to relay information using internet transfer protocols.
The gap between the device sensors and data networks is
filled by an IoT Platform. Such a platform connects the data
network to the sensor arrangement and provides insights
using backend applications to make sense of plethora of data
generated by hundreds of sensors.
Example: Amazon Web Services (AWS) IoT, Microsoft Azure
IoT, Thinger.IO, ThingsBoard, Kaa IoT Platform, etc.
What is IoT? (cont.)
10
What is IoT? (cont.)
11
IoT Programming Languages:
 C/C++
 Python
 Java
 Javascript/NodeJS
 Lua
 .NET
 PHP
 HTML
 Go
 Assembly Language
 etc.
What is IoT? (cont.)
What is Docker?
12
 Docker is a platform for developing, shipping and running
applications using container virtualization technology.
What is Docker? (cont.)
13
 Using containers, everything required to make a piece of
software run is packaged into isolated containers.
 Unlike VMs, containers do not bundle a full operating
system - only libraries and settings required to make the
software work are needed.
 This makes for efficient, lightweight, self-contained
systems and guarantees that software will always run the
same, regardless of where it’s deployed.
What is Docker? (cont.)
14
What is Docker? (cont.)
15
 The Docker Platform consists of multiple products/tools:
 Docker Engine
 Docker Registry
 Docker Machine
 Docker Swarm
 Docker Compose
 Kitematic
What is Docker? (cont.)
16
docker info # Displays system wide information of Docker
docker build # Build an image from a Dockerfile
docker images # List all images on a Docker host
docker pull # Pull an image from a Registry
docker run # Run an image
docker ps # List all running and stopped instances
docker stop # Stop a running instances
docker rm # Remove an instance
docker rmi # Remove an image
docker stats # Show running containers‘ resource usage info
docker attach # Attach to a running container
docker logs # Fetch the logs of a container
docker inspect # Return low-level information on a container
docker history # Show the history of an image
https://docs.docker.com/engine/reference/commandline/docker/
What is Docker? (cont.)
17
The Docker way …
Programming IoT with Docker?
18
 Linux Distribution: Ubuntu Desktop 17.04 (amd64)
 Docker Version: Docker 17.05-ce
https://www.docker.com/community-edition
https://store.docker.com/search?type=edition&offering=community
https://mobyproject.org/
https://github.com/moby/moby/releases
Docker Installation
19
 https://store.docker.com/search?offering=community&type=edi
tion
 sudo apt-get -y install apt-transport-https ca-certificates
curl
 curl -fsSL https://download.docker.com/linux/ubuntu/gpg |
sudo apt-key add –
 sudo add-apt-repository "deb [arch=amd64]
https://download.docker.com/linux/ubuntu $(lsb_release -cs)
stable"
Docker Installation
20
 sudo apt update
 sudo apt-get -y install docker-ce
(OR)
 curl -fsSL https://get.docker.com/ | sh
 sudo usermod -aG docker $(whoami)
(for multi arch Docker)
 sudo apt install binfmt-support qemu-user-static
Docker Hub Registry
21
Development Environment
22
Boards USB Cable
Docker running
inside a computer
Enable USB Support for Docker
23
 Running docker cli with:
docker run …
--privileged
--device=/dev/ttyUSB0
-v /dev/bus/usb:/dev/bus/usb
Johnny-Five …
24
sudo docker run -ti --privileged node /bin/bash
(in container)
npm install johnny-five
node helloworld.js
// file: helloworld.js
var five = require("johnny-five");
var board = new five.Board();
board.on("ready", function() {
// Create a standard `led` component instance
var led = new five.Led(13);
// "blink" the led in 1500ms
// on-off phase periods
led.blink(1500);
});
ESP32 …
25
docker pull tavk/esp32-sdk:0.1.0
sudo docker run -t -i -u esp 
-v /home/user1/esp-
idf/examples/01_hello_world:/home/esp/shared_project 
tavk/esp32-sdk:0.1.0 
make all
sudo docker run -t -i -u esp 
--device=/dev/ttyUSB0 
-v /home/user1/esp-
idf/examples/01_hello_world:/home/esp/shared_project 
tavk/esp32-sdk:0.1.0 
make flash
Reference: https://github.com/T-vK/docker-esp-sdk/tree/esp32
Apache MyNewt …
26
#!/bin/bash
if [ "$1" = "debug" ] || [ "$1" = "run" ]
then
ti="-ti"
fi
docker run -e NEWT_USER=$(id -u) -e NEWT_GROUP=$(id -g) -e
NEWT_HOST=$(uname) $ti --rm --device=/dev/bus/usb --privileged -v
$(pwd):/workspace -w /workspace mynewt/newt:latest /newt "$@"
Reference: https://mynewt.incubator.apache.org/latest/os/get_started/docker/
https://mynewt.incubator.apache.org/latest/os/tutorials/arduino_zero/
bash file:
newt
 cd myproject
 ../newt version
Build your own recipe …
27
 Use Dockerfile and build your own new image
 Look into others Dockerfile from Docker Hub Registry, improved it
and start build your own images …
 mkdir myspecial1
 cd myimage
 nano Dockerfile
 docker build -t myspecial1 .
 docker run --privileged -v /dev/bus/usb:/dev/bus/usb
myspecial1 ...
Multi Arch Docker …
28
 Reference: https://docs.docker.com/docker-for-mac/multi-arch/
http://collabnix.com/archives/1778
Q & A
29
Thank you
30
https://www.slideshare.net/msyukor/presentations
Happy programming IoT
with Docker

More Related Content

What's hot

Docker engine - Indroduc
Docker engine - IndroducDocker engine - Indroduc
Docker engine - IndroducAl Gifari
 
Building Reusable Development Environments with Docker
Building Reusable Development Environments with DockerBuilding Reusable Development Environments with Docker
Building Reusable Development Environments with DockerRevelation Technologies
 
Raspberry Pi Swarm Cluster
Raspberry Pi Swarm ClusterRaspberry Pi Swarm Cluster
Raspberry Pi Swarm ClusterEueung Mulyana
 
Docker-Hanoi @DKT , Presentation about Docker Ecosystem
Docker-Hanoi @DKT , Presentation about Docker EcosystemDocker-Hanoi @DKT , Presentation about Docker Ecosystem
Docker-Hanoi @DKT , Presentation about Docker EcosystemVan Phuc
 
Hide your development environment and application in a container
Hide your development environment and application in a containerHide your development environment and application in a container
Hide your development environment and application in a containerJohan Janssen
 
Docker 101 @KACST Saudi HPC 2016
Docker 101  @KACST Saudi HPC 2016Docker 101  @KACST Saudi HPC 2016
Docker 101 @KACST Saudi HPC 2016Walid Shaari
 
[DockerCon 2019] Hardening Docker daemon with Rootless mode
[DockerCon 2019] Hardening Docker daemon with Rootless mode[DockerCon 2019] Hardening Docker daemon with Rootless mode
[DockerCon 2019] Hardening Docker daemon with Rootless modeAkihiro Suda
 
Usernetes: Kubernetes as a non-root user
Usernetes: Kubernetes as a non-root userUsernetes: Kubernetes as a non-root user
Usernetes: Kubernetes as a non-root userAkihiro Suda
 
Intro- Docker Native for OSX and Windows
Intro- Docker Native for OSX and WindowsIntro- Docker Native for OSX and Windows
Intro- Docker Native for OSX and WindowsThomas Chacko
 
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
Introduction to Docker at SF Peninsula Software Development Meetup @GuidewireIntroduction to Docker at SF Peninsula Software Development Meetup @Guidewire
Introduction to Docker at SF Peninsula Software Development Meetup @GuidewiredotCloud
 
[KubeConEU] Building images efficiently and securely on Kubernetes with BuildKit
[KubeConEU] Building images efficiently and securely on Kubernetes with BuildKit[KubeConEU] Building images efficiently and securely on Kubernetes with BuildKit
[KubeConEU] Building images efficiently and securely on Kubernetes with BuildKitAkihiro Suda
 
[DockerCon 2020] Hardening Docker daemon with Rootless Mode
[DockerCon 2020] Hardening Docker daemon with Rootless Mode[DockerCon 2020] Hardening Docker daemon with Rootless Mode
[DockerCon 2020] Hardening Docker daemon with Rootless ModeAkihiro Suda
 
Dessi docker kubernetes paas cloud
Dessi docker kubernetes paas cloudDessi docker kubernetes paas cloud
Dessi docker kubernetes paas cloudMassimiliano Dessì
 
Perspectives on Docker
Perspectives on DockerPerspectives on Docker
Perspectives on DockerRightScale
 
Developer workflow with docker
Developer workflow with dockerDeveloper workflow with docker
Developer workflow with dockerLalatendu Mohanty
 
Rootless Containers
Rootless ContainersRootless Containers
Rootless ContainersAkihiro Suda
 
LinuxKit and Moby, news from DockerCon 2017 - Austin,TX
LinuxKit and Moby, news from DockerCon 2017 - Austin,TXLinuxKit and Moby, news from DockerCon 2017 - Austin,TX
LinuxKit and Moby, news from DockerCon 2017 - Austin,TXDieter Reuter
 
DockerとKubernetesをかけめぐる
DockerとKubernetesをかけめぐるDockerとKubernetesをかけめぐる
DockerとKubernetesをかけめぐるKohei Tokunaga
 

What's hot (20)

Docker engine - Indroduc
Docker engine - IndroducDocker engine - Indroduc
Docker engine - Indroduc
 
Building Reusable Development Environments with Docker
Building Reusable Development Environments with DockerBuilding Reusable Development Environments with Docker
Building Reusable Development Environments with Docker
 
Raspberry Pi Swarm Cluster
Raspberry Pi Swarm ClusterRaspberry Pi Swarm Cluster
Raspberry Pi Swarm Cluster
 
Docker-Hanoi @DKT , Presentation about Docker Ecosystem
Docker-Hanoi @DKT , Presentation about Docker EcosystemDocker-Hanoi @DKT , Presentation about Docker Ecosystem
Docker-Hanoi @DKT , Presentation about Docker Ecosystem
 
Hide your development environment and application in a container
Hide your development environment and application in a containerHide your development environment and application in a container
Hide your development environment and application in a container
 
Docker 101 @KACST Saudi HPC 2016
Docker 101  @KACST Saudi HPC 2016Docker 101  @KACST Saudi HPC 2016
Docker 101 @KACST Saudi HPC 2016
 
Docker linuxday 2015
Docker linuxday 2015Docker linuxday 2015
Docker linuxday 2015
 
[DockerCon 2019] Hardening Docker daemon with Rootless mode
[DockerCon 2019] Hardening Docker daemon with Rootless mode[DockerCon 2019] Hardening Docker daemon with Rootless mode
[DockerCon 2019] Hardening Docker daemon with Rootless mode
 
Usernetes: Kubernetes as a non-root user
Usernetes: Kubernetes as a non-root userUsernetes: Kubernetes as a non-root user
Usernetes: Kubernetes as a non-root user
 
Docker dDessi november 2015
Docker dDessi november 2015Docker dDessi november 2015
Docker dDessi november 2015
 
Intro- Docker Native for OSX and Windows
Intro- Docker Native for OSX and WindowsIntro- Docker Native for OSX and Windows
Intro- Docker Native for OSX and Windows
 
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
Introduction to Docker at SF Peninsula Software Development Meetup @GuidewireIntroduction to Docker at SF Peninsula Software Development Meetup @Guidewire
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
 
[KubeConEU] Building images efficiently and securely on Kubernetes with BuildKit
[KubeConEU] Building images efficiently and securely on Kubernetes with BuildKit[KubeConEU] Building images efficiently and securely on Kubernetes with BuildKit
[KubeConEU] Building images efficiently and securely on Kubernetes with BuildKit
 
[DockerCon 2020] Hardening Docker daemon with Rootless Mode
[DockerCon 2020] Hardening Docker daemon with Rootless Mode[DockerCon 2020] Hardening Docker daemon with Rootless Mode
[DockerCon 2020] Hardening Docker daemon with Rootless Mode
 
Dessi docker kubernetes paas cloud
Dessi docker kubernetes paas cloudDessi docker kubernetes paas cloud
Dessi docker kubernetes paas cloud
 
Perspectives on Docker
Perspectives on DockerPerspectives on Docker
Perspectives on Docker
 
Developer workflow with docker
Developer workflow with dockerDeveloper workflow with docker
Developer workflow with docker
 
Rootless Containers
Rootless ContainersRootless Containers
Rootless Containers
 
LinuxKit and Moby, news from DockerCon 2017 - Austin,TX
LinuxKit and Moby, news from DockerCon 2017 - Austin,TXLinuxKit and Moby, news from DockerCon 2017 - Austin,TX
LinuxKit and Moby, news from DockerCon 2017 - Austin,TX
 
DockerとKubernetesをかけめぐる
DockerとKubernetesをかけめぐるDockerとKubernetesをかけめぐる
DockerとKubernetesをかけめぐる
 

Similar to Programming IoT with Docker: How to Start?

Build and run embedded apps faster from qt creator with docker
Build and run embedded apps faster from qt creator with dockerBuild and run embedded apps faster from qt creator with docker
Build and run embedded apps faster from qt creator with dockerQt
 
Webinar: Building Embedded Applications from QtCreator with Docker
Webinar: Building Embedded Applications from QtCreator with DockerWebinar: Building Embedded Applications from QtCreator with Docker
Webinar: Building Embedded Applications from QtCreator with DockerBurkhard Stubert
 
[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안양재동 코드랩
 
Accelerate your development with Docker
Accelerate your development with DockerAccelerate your development with Docker
Accelerate your development with DockerAndrey Hristov
 
Accelerate your software development with Docker
Accelerate your software development with DockerAccelerate your software development with Docker
Accelerate your software development with DockerAndrey Hristov
 
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...Ambassador Labs
 
Docker - Der Wal in der Kiste
Docker - Der Wal in der KisteDocker - Der Wal in der Kiste
Docker - Der Wal in der KisteUlrich Krause
 
JDD2014: Docker.io - versioned linux containers for JVM devops - Dominik Dorn
JDD2014: Docker.io - versioned linux containers for JVM devops - Dominik DornJDD2014: Docker.io - versioned linux containers for JVM devops - Dominik Dorn
JDD2014: Docker.io - versioned linux containers for JVM devops - Dominik DornPROIDEA
 
VMware@Night: Container & Virtualisierung
VMware@Night: Container & VirtualisierungVMware@Night: Container & Virtualisierung
VMware@Night: Container & VirtualisierungDigicomp Academy AG
 
VMware@Night Container and Virtualization
VMware@Night Container and VirtualizationVMware@Night Container and Virtualization
VMware@Night Container and VirtualizationOpvizor, Inc.
 
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins Mando Stam
 
Delivering Docker & K3s worloads to IoT Edge devices
Delivering Docker & K3s worloads to IoT Edge devicesDelivering Docker & K3s worloads to IoT Edge devices
Delivering Docker & K3s worloads to IoT Edge devicesAjeet Singh Raina
 
GDGSCL - Docker a jeho provoz v Heroku a AWS
GDGSCL - Docker a jeho provoz v Heroku a AWSGDGSCL - Docker a jeho provoz v Heroku a AWS
GDGSCL - Docker a jeho provoz v Heroku a AWSLadislav Prskavec
 
ContainerDays Boston 2016: "Docker For the Developer" (Borja Burgos)
ContainerDays Boston 2016: "Docker For the Developer" (Borja Burgos)ContainerDays Boston 2016: "Docker For the Developer" (Borja Burgos)
ContainerDays Boston 2016: "Docker For the Developer" (Borja Burgos)DynamicInfraDays
 
IAU workshop 2018 day one
IAU workshop 2018 day oneIAU workshop 2018 day one
IAU workshop 2018 day oneWalid Shaari
 
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...Ambassador Labs
 

Similar to Programming IoT with Docker: How to Start? (20)

Build and run embedded apps faster from qt creator with docker
Build and run embedded apps faster from qt creator with dockerBuild and run embedded apps faster from qt creator with docker
Build and run embedded apps faster from qt creator with docker
 
Webinar: Building Embedded Applications from QtCreator with Docker
Webinar: Building Embedded Applications from QtCreator with DockerWebinar: Building Embedded Applications from QtCreator with Docker
Webinar: Building Embedded Applications from QtCreator with Docker
 
[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안
 
Accelerate your development with Docker
Accelerate your development with DockerAccelerate your development with Docker
Accelerate your development with Docker
 
Accelerate your software development with Docker
Accelerate your software development with DockerAccelerate your software development with Docker
Accelerate your software development with Docker
 
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
 
Docker - Der Wal in der Kiste
Docker - Der Wal in der KisteDocker - Der Wal in der Kiste
Docker - Der Wal in der Kiste
 
JDD2014: Docker.io - versioned linux containers for JVM devops - Dominik Dorn
JDD2014: Docker.io - versioned linux containers for JVM devops - Dominik DornJDD2014: Docker.io - versioned linux containers for JVM devops - Dominik Dorn
JDD2014: Docker.io - versioned linux containers for JVM devops - Dominik Dorn
 
VMware@Night: Container & Virtualisierung
VMware@Night: Container & VirtualisierungVMware@Night: Container & Virtualisierung
VMware@Night: Container & Virtualisierung
 
VMware@Night Container and Virtualization
VMware@Night Container and VirtualizationVMware@Night Container and Virtualization
VMware@Night Container and Virtualization
 
Docker
DockerDocker
Docker
 
citus™ iot ecosystem
citus™ iot ecosystemcitus™ iot ecosystem
citus™ iot ecosystem
 
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
 
Docker Ecosystem on Azure
Docker Ecosystem on AzureDocker Ecosystem on Azure
Docker Ecosystem on Azure
 
Delivering Docker & K3s worloads to IoT Edge devices
Delivering Docker & K3s worloads to IoT Edge devicesDelivering Docker & K3s worloads to IoT Edge devices
Delivering Docker & K3s worloads to IoT Edge devices
 
GDGSCL - Docker a jeho provoz v Heroku a AWS
GDGSCL - Docker a jeho provoz v Heroku a AWSGDGSCL - Docker a jeho provoz v Heroku a AWS
GDGSCL - Docker a jeho provoz v Heroku a AWS
 
ContainerDays Boston 2016: "Docker For the Developer" (Borja Burgos)
ContainerDays Boston 2016: "Docker For the Developer" (Borja Burgos)ContainerDays Boston 2016: "Docker For the Developer" (Borja Burgos)
ContainerDays Boston 2016: "Docker For the Developer" (Borja Burgos)
 
IAU workshop 2018 day one
IAU workshop 2018 day oneIAU workshop 2018 day one
IAU workshop 2018 day one
 
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
 
Demystifying Docker101
Demystifying Docker101Demystifying Docker101
Demystifying Docker101
 

Recently uploaded

The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 

Recently uploaded (20)

The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 

Programming IoT with Docker: How to Start?

  • 1. PROGRAMMING IOT WITH DOCKER: HOW TO START? Mohd Syukor Abdul Open Source Community 19 May 2017
  • 2. Agenda 2  What is IoT?  What is Docker?  Programming IoT with Docker?
  • 3. What is IoT? 3  https://www.postscapes.com/internet-of-things-award/open-source/
  • 4. What is IoT? (cont.) 4  According to Gartner, the Internet of Things will balloon to 26 billion devices by 2020.  There’s big money in these little devices: Gartner projects IoT will result in $1.9 trillion in global economic “value- add”—the combined benefits that businesses derive through the sale and usage of IoT technology.  http://www.gartner.com/newsroom/id/2636073
  • 5. 5  In Malaysia: National Internet of Things (IoT) Strategic Roadmap (http://mimos.my/iot/roadmap2.html) What is IoT? (cont.)
  • 6. 6  IoT Boards: … and much more !!! What is IoT? (cont.)
  • 7. 7  IoT Sensors: … and much more !!! What is IoT? (cont.)
  • 8. 8  IoT Gateways: … and much more !!! What is IoT? (cont.)
  • 9. 9 IoT Platform: In simple words the purpose of any IoT device is to connect with other IoT devices and applications (cloud-based mostly) to relay information using internet transfer protocols. The gap between the device sensors and data networks is filled by an IoT Platform. Such a platform connects the data network to the sensor arrangement and provides insights using backend applications to make sense of plethora of data generated by hundreds of sensors. Example: Amazon Web Services (AWS) IoT, Microsoft Azure IoT, Thinger.IO, ThingsBoard, Kaa IoT Platform, etc. What is IoT? (cont.)
  • 10. 10 What is IoT? (cont.)
  • 11. 11 IoT Programming Languages:  C/C++  Python  Java  Javascript/NodeJS  Lua  .NET  PHP  HTML  Go  Assembly Language  etc. What is IoT? (cont.)
  • 12. What is Docker? 12  Docker is a platform for developing, shipping and running applications using container virtualization technology.
  • 13. What is Docker? (cont.) 13  Using containers, everything required to make a piece of software run is packaged into isolated containers.  Unlike VMs, containers do not bundle a full operating system - only libraries and settings required to make the software work are needed.  This makes for efficient, lightweight, self-contained systems and guarantees that software will always run the same, regardless of where it’s deployed.
  • 14. What is Docker? (cont.) 14
  • 15. What is Docker? (cont.) 15  The Docker Platform consists of multiple products/tools:  Docker Engine  Docker Registry  Docker Machine  Docker Swarm  Docker Compose  Kitematic
  • 16. What is Docker? (cont.) 16 docker info # Displays system wide information of Docker docker build # Build an image from a Dockerfile docker images # List all images on a Docker host docker pull # Pull an image from a Registry docker run # Run an image docker ps # List all running and stopped instances docker stop # Stop a running instances docker rm # Remove an instance docker rmi # Remove an image docker stats # Show running containers‘ resource usage info docker attach # Attach to a running container docker logs # Fetch the logs of a container docker inspect # Return low-level information on a container docker history # Show the history of an image https://docs.docker.com/engine/reference/commandline/docker/
  • 17. What is Docker? (cont.) 17 The Docker way …
  • 18. Programming IoT with Docker? 18  Linux Distribution: Ubuntu Desktop 17.04 (amd64)  Docker Version: Docker 17.05-ce https://www.docker.com/community-edition https://store.docker.com/search?type=edition&offering=community https://mobyproject.org/ https://github.com/moby/moby/releases
  • 19. Docker Installation 19  https://store.docker.com/search?offering=community&type=edi tion  sudo apt-get -y install apt-transport-https ca-certificates curl  curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add –  sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
  • 20. Docker Installation 20  sudo apt update  sudo apt-get -y install docker-ce (OR)  curl -fsSL https://get.docker.com/ | sh  sudo usermod -aG docker $(whoami) (for multi arch Docker)  sudo apt install binfmt-support qemu-user-static
  • 22. Development Environment 22 Boards USB Cable Docker running inside a computer
  • 23. Enable USB Support for Docker 23  Running docker cli with: docker run … --privileged --device=/dev/ttyUSB0 -v /dev/bus/usb:/dev/bus/usb
  • 24. Johnny-Five … 24 sudo docker run -ti --privileged node /bin/bash (in container) npm install johnny-five node helloworld.js // file: helloworld.js var five = require("johnny-five"); var board = new five.Board(); board.on("ready", function() { // Create a standard `led` component instance var led = new five.Led(13); // "blink" the led in 1500ms // on-off phase periods led.blink(1500); });
  • 25. ESP32 … 25 docker pull tavk/esp32-sdk:0.1.0 sudo docker run -t -i -u esp -v /home/user1/esp- idf/examples/01_hello_world:/home/esp/shared_project tavk/esp32-sdk:0.1.0 make all sudo docker run -t -i -u esp --device=/dev/ttyUSB0 -v /home/user1/esp- idf/examples/01_hello_world:/home/esp/shared_project tavk/esp32-sdk:0.1.0 make flash Reference: https://github.com/T-vK/docker-esp-sdk/tree/esp32
  • 26. Apache MyNewt … 26 #!/bin/bash if [ "$1" = "debug" ] || [ "$1" = "run" ] then ti="-ti" fi docker run -e NEWT_USER=$(id -u) -e NEWT_GROUP=$(id -g) -e NEWT_HOST=$(uname) $ti --rm --device=/dev/bus/usb --privileged -v $(pwd):/workspace -w /workspace mynewt/newt:latest /newt "$@" Reference: https://mynewt.incubator.apache.org/latest/os/get_started/docker/ https://mynewt.incubator.apache.org/latest/os/tutorials/arduino_zero/ bash file: newt  cd myproject  ../newt version
  • 27. Build your own recipe … 27  Use Dockerfile and build your own new image  Look into others Dockerfile from Docker Hub Registry, improved it and start build your own images …  mkdir myspecial1  cd myimage  nano Dockerfile  docker build -t myspecial1 .  docker run --privileged -v /dev/bus/usb:/dev/bus/usb myspecial1 ...
  • 28. Multi Arch Docker … 28  Reference: https://docs.docker.com/docker-for-mac/multi-arch/ http://collabnix.com/archives/1778