🛠 Docker dès la sortie de l'emballage : premier conteneur sur le Linux embarqué

Arduino Portenta X8 · debutant · Schéma : IMG-portenta-x8-debutant-3-portenta-x8-docker-hello-world.svg — Arduino Portenta X8 en coupe stylisée : le noyau Linux en bas, des boîtes conteneur Docker empilées au-dessus (python, node, hello-world), terminal adb affichant docker run hello-world et le message de bienvenue, étiquette Yocto LMP Foundries.io

Objectives

The true superpower of the X8: its embedded Linux (Linux microPlatform, Foundries.io Yocto distribution) ships with Docker preinstalled. Applications run in containers decoupled from the OS — modular deployment, incremental OTA, ready-to-use images on the arduino Docker Hub. You will launch your first container, understand the docker permissions story, and pull an official Arduino image.

Hardware

Complete code

# Depuis le PC :
adb shell
# fio@portenta-x8:~$

# Permission docker : la doc officielle recommande d'abord :
newgrp - docker

# Le test canonique, fonctionne out of the box :
docker run hello-world
# -> "Hello from Docker! This message shows that your installation...

# Images officielles Arduino sur Docker Hub (org « arduino ») :
docker pull arduino/python-rpc-serial

# Lancer le conteneur officiel du tuto python-arduino-data-exchange :
docker run -d \
  --name python-rpc-serial \
  --restart unless-stopped \
  -e PYTHONUNBUFFERED=1 \
  --tty \
  --read-only \
  -p 5002-5020:5002-5020 \
  -v /tmp:/tmp \
  --device /dev/ttyGS0 \
  arduino/python-rpc-serial

# Inventaire local
docker images
docker ps -a

Expected verification

docker run hello-world displays the welcome message in a few seconds (download included) — proof that the Docker daemon, eMMC storage, and network are working. The arduino/python-rpc-serial container starts in the background (docker ps lists it as "Up"): it exposes RPC ports 5002-5020 and the serial device /dev/ttyGS0, the gateway to the M4 sketch in the next tutorial.

Common errors

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials