Après Docker sur PaaS (Voir mon article HPE Helion Stackato), voici Docker sur Raspberry Pi. L’article décrit les étapes d’installation afin de mettre en place notre prochain Lab de test.

1- Assembler les composants du Raspberry Pi:

Branchement du PoE

Couvrir le Raspberry Pi avec une enclosure

Branchement du Raspberry Pi en ethernet

2- Installation du SE

Télécharger Raspbian qui servira d’OS:

Raspbian

Télécharger BalenaEtcher pour créer une clé USB bootable:

https://www.balena.io/etcher/

Création de la clé USB bootable

Etcher 
Select image 
Al Mass S...SB Device 
Flash! 
balena Etcher 
Change 
6.12 
is an open Source project by 
balena 
s.s9

Sélectionner l’image Raspbian précédemment téléchargée

Ouvrir 
Organiser 
Bureau 
CePC Téléchargements 
Nouveau dossier 
O 
Nom 
Vxrail 
Dell Networking 
vha- repot- project- 
openvpn-2.4.7 
PowerCLI- Example- 
ManAudioPro 
rpi-boot-eeprom-re... 
2019-09-26-raspbia... 
recalbox-rpß.img 
VXRAIL COMPOSIT... 
TSR201g10210g1331. 
backup (2) 
backup (I) 
backup 
17762 727 
Date 
20/09/2019 17:28 
18/09/2019 11:49 
07/08/2019 16:27 
05/08/2019 12:05 
09/07/2019 16:09 
02/07/201 g 23:38 
01/06/2019 17:41 
03/11/2019 14:55 
03/11/2019 1430 
22/10/2019 17:21 
21/10/2019 11:25 
21/10/2019 11:20 
21/10/2019 11:19 
21/10/2019 11:17 
16-51 
Type 
Dossier de fichiers 
Dossier de fichiers 
Dossier de fichiers 
Dossier de fichiers 
Dossier de fichiers 
Dossier de fichiers 
Dossier de fichiers 
Arch,ve WinRAR ZIP 
Archive WinRAR ZIP 
Archive WinRAR 
Arch,ve WinRAR ZIP 
Archive WinRAR ZIP 
Arch,ve WinRAR ZIP 
Archive WinRAR ZIP 
Archive WinRAR ZIP 
Hi 
Taille 
Mots clés 
Documents 
mages 
Musique 
Objets 3D 
Téléchargement 
Vidéos 
os 
Data (D:) 
800T (8) 
Lecteur USB (F:) 
Syncplicit,' (S:) 
800T (8) 
Nom du fichier: 201g-Dg 26 raspbian-buster-full 
148 Ko 
2601 870 Ko 
366 692 Ko 
4 123 548 Ko 
20 402 Ko 
OS mages 
Ouvrir 
Annuler

Cliquez sur Flash

Etcher — Flashing 
While you are waitirw, m_lt OL' featured 
Audio Jack 
Bring your old speakers back to life! 
Twn yow old speakers or H-Fi into receivers with a 
Raspberry Pi and tws glide 
View guide 
balena Etcher is an open source project by 
.ull.img 
6.81 GB 
2019-09.. 
Al Mass... Device 
3% Flashing 
balena 
o 
s.sg
Etcher —42% Validating 
While you are waitirw, m_lt OL' featured 
Audio Jack 
Bring your old speakers back to life! 
Twn yow old speakers or H-Fi into receivers with a 
Raspberry Pi and tws step-by-stg) guide 
View guide 
balena Etcher is an open source project by 
.ull.img 
6.81 GB 
2019-09.. 
Al Mass... Device 
42% Validating 
o 
balena 
s.s9

Une fois la clé USB flashée, accédez au répertoire racine de la clé, créer un fichier vierge et nommez là SSH

Organiser 
Sureau 
Enregistrer sous 
cepc boot(8) 
bcm27D8- r pi- b .dtb 
Nouveau dossier 
Nom 
Modifié le 
20,09/2019 14:cu 
20,09/2019 14:cu 
20,09/2019 14:cu 
08/07/2019 14:02 
08/07/2019 14:02 
08/07/2019 14:02 
25,09/2019 15:28 
08/07/2019 14:02 
08/07/2019 14:02 
20,09/2019 14:cu 
17,09/2019 14:29 
25,09/2019 15:28 
ni,4F, 
Type 
Dossier de fichiers 
Fichier DTB 
Fichier DTB 
Fichier DTB 
Fichier DTB 
Fichier DTB 
Fichier DTB 
Fichier DTB 
Fichier DTB 
Fichier DTB 
Fichier DTB 
Fichier DTB 
Fichier BIN 
Taille 
Rechercher clans: boot (E:) 
24 Ko 
24 Ko 
24 Ko 
24 Ko 
24 Ko 
25 Ko 
25 Ko 
26 Ko 
27 Ko 
25 Ko 
40 Ko 
52 Ko 
O 
Documents 
mages 
Musique 
Objets 30 
Téléchargement 
Vidéos 
OS (Q) 
Data 
boot (E:) 
Lecteur usa 
Syncplicity (S) v 
Nom du fichier : ssh 
bcm27D8- rpi-b- plus.dtb 
bcm27D8- r pi-cm.dtb 
bcm27D8- r pi-zero.dtb 
bcm27D8-rpi-zero-w.dtb 
bcm27D9- r pi-2- b.dtb 
bcm2710 
-rpi-2-b.dtb 
bcm2710-rpi-3-b.dtb 
bcm2710-rpi-3-b-pIus.dtb 
bcm2710 rpi-cm3.dtb 
bcm2711-rpi-4-b.dtb 
bootcode.bin 
rmrlline 
Type : Tous les fichiers 
A Masquer les dossiers 
Encodage : 
ANSI 
Enregistrer 
Annuler

Insérez là la clé USB à votre Raspberry PI.

Connexion au Raspberry PI via Putty: raspberrypi.local

PuTTY Configuration 
Cat ego" 
Logging 
Terminal 
Keybo ard 
Window 
Appearance 
Behaviour 
Translation 
Selection 
Colouß 
Connection 
Telnet 
Rlogin 
Basic options for your PuTTY session 
Specify the destination you want to connect to 
Host Name (or IP address) 
Connection type 
C) Raw C) elnet ORIogin @SSH O Sehal 
Isad save or delete a stored session 
Saved Sessions 
Default Settings 
Close window on exit 
C) Aways C) Never 
Save 
@Only on clean exit

Login par défaut: pi et mot de passe: raspberry

pi@raspberrypi: — 
login as: 
pi@IaspbeIIypi . local s password: 
Linux raspberrypi 4.1g.7s-v7+ #1270 SMP Tue sep 24 EST 2019 armv71 
e programs included with Che Debi an GNU/ Linux system are free software; 
the exact distribution terms for each program are described in Che 
individual files in /usr/share/doc/*/copyrighc . 
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, 
permitted by applicable law. 
Last login: Thu sep 26 2019 
Co Che extent 
SSH is enabled and Che default password for Che 'pi' user has not been changed. 
is is a security risk — please login as Che 'pi' user and Cype 'passwd' Co sec 
a new password. 
pi eraspberryrpi : —

Définir une adresse IP. Accédez:

sudo nano /etc/dhcpcd.conf

Changer le fichier de configuration en décochant les commentaires:

interface eth0
static ip_address=192.168.0.55/24
static routers=192.168.0.1
static domain_name_servers=192.168.0.1

/ e cc/ dhcpcd 
Most distributions have NT P . 
*option nCp servers 
A Server ID is required by REC2131. 
require dhcp server identifier 
pi@raspberrypi: — 
GNU nano 3.2 
:dg2e: :ff/E4 
0.1 8.8. 8.8 
. conf 
Generate SLAAC address using Che Hardware Address of Che 
#slaac hwaddr 
OR generate Stable Private IPv6 Addresses based from Che 
Modified 
inc e fa ce 
DUID 
slaac private 
Example static IP configuration: 
interface ethO 
static ip address=192.168.O.SS124 
*static i PE address=fdSI : 42f8 : caae 
static routers—192.168. 0.1 
static domain name servers—192 . 168. 
fdS1 : 
Get Help 
Exit 
WI ice Out 
Read File 
Whe re 
Is 
Replace 
Cuc Text 
Uncut Text 
Jus C i fy 
To spell 
Cur Pos 
Go To Line

Brancher le Raspberry Pi au routeur en ethernet et lancer un test Ping à l’adresse IP

Invite de commandes 
: 192 .168.e. ss 
Envoi d'une requête Ping' 192.168,8. SS avec 32 octets de données . 
Réponse de 192.168.e.ss 
Réponse de 192.168.a.ss 
Réponse de 192.168.a.ss 
Réponse de 192.168.e.ss 
octets=32 temps=273 ms TTL=64 
octets=32 temps=2 ms TTL=64 
octets=32 temps=2 ms TTL=64 
octets=32 temps=387 ms TTL=64 
tatistiques Ping pour 192.168.B.SS: 
. envoyés = 4, reçus = 4, perdus = B (perte 8%), 
Paquets 
urée approximative des boucles en millisecondes 
Minimum = 2ms, Maximum = 387ms, Moyenne = 166ms 
: \Users\KarimSABBAGH>

Connexion à l’adresse IP Raspberry Pi via putty

PuTTY Configuration 
Cat egory 
Logging 
Terminal 
Keybo ard 
Window 
Appearance 
Behaviour 
Translation 
Selection 
Connection 
Telnet 
Rlogin 
Basic options for your PuTTY session 
Specify the destination you want to connect to 
Host Name (or IP address) 
Connection type 
C) Raw C) elnet C)RIog'n @SSH O Sehal 
Isad save or delete a stored session 
Saved Sessions 
Default Settings 
Close window on exit 
C) Aways C) Never 
Save 
@Only on clean exit

 Login par défaut: pi et mot de passe: raspberry

pi@raspberrypi: — 
login as: pi 
pi@Ig2.168.O.SS's password: 
Linux raspberrypi 4.1g.7s-v7+ #1270 SMP Tue sep 24 EST 2019 armv71 
e programs included with Che Debi an GNU/ Linux system are free software; 
the exact distribution terms for each program are described in Che 
individual files in /usr/share/doc/*/copyrighc . 
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, co che extent 
permitted by applicable law. 
Last login: Thu sep 26 2019 from fe80: 
SSH is enabled and Che default password for Che 'pi' user has not been changed. 
is is a security risk — please login as Che 'pi' user and Cype 'passwd' Co set 
a new password. 
pi eraspberryrpi : —

3- Installation de VNC:

Etant donné que je n’ai pas d’écran à ma disposition afin de brancher mon Raspberry Pi et de tester les application, je vais procéder à activer VNC avec la commande:

sudo raspi-config

pi@raspberrypi: — 
login as: 
pi@Ig2.168.O.SS's password: 
Linux raspberrypi 4.1g.7s-v7+ #1270 SMP Tue sep 24 EST 2019 armv71 
e programs included with Che Debi an GNU/ Linux system are free software; 
the exact distribution terms for each program are described in Che 
individual files in /usr/share/doc/*/copyrighc . 
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, co che extent 
permitted by applicable law. 
Last login: Thu sep 26 2019 from fe80: 
SSH is enabled and Che default password for Che 'pi' user has not been changed. 
is is a security risk — please login as Che 'pi' user and Cype 'passwd' Co set 
a new password. 
pi eraspberryrpi : — 
sudo raspi—config

Sélectionnez Interfacing Options

Activation de VNC

pi@raspberpypi: 
Would the Server to be enabIed2
pi@raspberrypi: — 
The Server is enabled

Télécharger et installez VNC Viewer depuis https://www.realvnc.com/en/connect/download/viewer/

Lancez VNC Viewer et tapez l’adresse IP de votre Raspberry Pi. Insérez le login et mot de passe

VNC Viewer 
Fichier Afficher Aide 
vnc connecT 
192.168.0.55 
E - Viewer 
Authentification 
Authentification auprès de VNC Server 
(TCP) 
Saisissez vos identifiants VNC Server 
(Indice : II ne s'agit PAS de vos informations de compte RealVNC) 
Nom d' utilisateur : pi 
Mot de passe : 
raspberpÀ 
Mémoriser le mot de passe 
Mot de passe oublié ? 
Alias : 
Signature : 
Installez VNC 
Vous pouvez égale 
Proxy media octopus. Antenna friend strong. 
41-29-41-50 86-e1-eb-6c 
Annuler 
Karim Sabbagh 
votre équipe. 
rre de recherche.

Cliquez sur OK. L’interface graphique du Raspberry Pi s’affiche sur VNC Viewer:

192.168.0.55 (raspberrypi) - VNC Viewer 
Welcome to Raspberr.. 
Welcome to Raspberry' Pi 
Welcome to the Raspberry Pi Desktop! 
Before you stan using it, there are a few things to set up. 
1 6:45 
Press 'Next' to get staned. 
Cancel 
l? : 169254241 
Next

4- Installation de Docker:

Revenez sur Putty et procédez à l’installation de Docker

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

pißraspberrypi: — 
Experimental : 
containerd : 
Version : 
Version : 
Gi CCorunit : 
docker—iniC : 
Version : 
Gi CCorunit : 
false 
1.2. 10 
b34aSc8afS6eS108S2c3S414db4c1f4fa617233g 
1.0. O—rc8+dev 
3e42Sf80a8cg31f88e6dg4a8c831bgdsaa4816S7 
0.18. o 
fec3683 
If you would like Co use Docker as a non—root user, should now 
adding Y3ur user Co Che "docker" group with something like : 
sudo usermod —aG docker pi 
con s i de r 
Remeüer Chat will have Co log out and back in for Chis Co Cake effect 
ING: Adding a user Co Che "docker" group will grant Che ability Co run 
containers which can be used Co obtain root privileges on Che 
docker host . 
Refer Co hCCps : / (docs . 
n —attack—surface 
for more information. 
pi eraspberryrpi :

Accordez les permissions à l’utilisateur Pi pour exécuter les commandes Docker

sudo usermod -aG docker pi

Télécharger conteneur Hello-world

docker pull hello—world 
Using default tag: latest 
latest : Pulling from library/ hello—world 
cledaIOge4da: Pull complete 
Digest: sha2S6: c3b4ada4687bbaa17074Sb3e4dd8ac3f1g4cagSb2dOS18b417fb47eS87gdYbSf 
Status: Downloaded newer image for hello—world: latest 
docker . 10/ library/ hello—world : latest

Lancer le conteneur Hello-world

pi eraspberryrpi : — 
Hello from Docker! 
This message shows 
docker run library/ hello—world: latest 
Chat Y3ur installation appears Co be working 
correctly . 
To generate Chis message, Docker Cook Che following steps : 
The Docker client contacted the Docker daemon. 
The Docker daemon pulled Che "hello—world" image from Che Docker Hub . 
(arm32v7) 
The Docker daemon created a new container from Chat image which runs Che 
executable that produces the output you are currently leading . 
The Docker daemon screamed Chat output Co Che Docker client, which sent iC 
Co terminal . 
To Cry something more al&iCious, 
$ docker run —iC ubuntu bash 
Share images, automate workflows, 
can run an UbunCu container with : 
and more with a free Docker ID: 
https : / / hub . docker . com/ 
For more examples and ideas, 
visit: 
https : / 'docs . docker . com/get—started/

Maintenant, vous avez une idée de cadeau pour Noël 😉

Votre commentaire

Entrez vos coordonnées ci-dessous ou cliquez sur une icône pour vous connecter:

Logo WordPress.com

Vous commentez à l’aide de votre compte WordPress.com. Déconnexion /  Changer )

Photo Facebook

Vous commentez à l’aide de votre compte Facebook. Déconnexion /  Changer )

Connexion à %s

Ce site utilise Akismet pour réduire les indésirables. En savoir plus sur la façon dont les données de vos commentaires sont traitées.