🛠 Conteneuriser avec Docker sur le PC x86 embarqué
Objectives
The LattePanda 3 Delta is a full x86-64 PC: unlike ARM SBCs, all official Docker images from the registry (amd64) run without emulation. This tutorial installs Docker Engine on Ubuntu 22.04, launches a first container, then deploys a small stack of services with docker compose, taking into account embedded constraints: 64 GB eMMC (size volumes accordingly), 10 W TDP (limit CPU), 12 V/24 W power supply. We finish with automatic startup at boot.
Hardware
- LattePanda 3 Delta running Ubuntu 22.04, connected to the Internet (see the Wi-Fi/Ethernet tutorial)
- Disk space: check
df -h /before pulling images (64 GB eMMC total) - Optional for production: NVMe SSD in the M.2 Key M 2280 slot (PCIe 3.0 x2) to offload the eMMC
Complete code
# 1. Installer Docker Engine (paquet Ubuntu standard, architecture amd64)
sudo apt update
sudo apt install -y docker.io docker-compose-plugin
sudo usermod -aG docker $USER # puis se reconnecter
# 2. Premier conteneur de test
systemctl --now enable docker
docker run --rm hello-world
# 3. Petite pile de services — fichier compose.yaml
mkdir -p ~/pile && cd ~/pile
# compose.yaml — pile embarquée légère
services:
web:
image: nginx:alpine
ports: ["8080:80"]
restart: unless-stopped
deploy:
resources:
limits:
cpus: "1.0" # le N5105 a 4 threads, on ménage la carte
memory: 256M
mosquitto:
image: eclipse-mosquitto:2
ports: ["1883:1883"]
volumes:
- ./mosquitto:/mosquitto/data
restart: unless-stopped
# 4. Démarrer et vérifier
docker compose up -d
docker compose ps
docker stats --no-stream # surveiller la CPU pendant la charge
curl -sI http://localhost:8080 | head -1
Expected verification
hello-world is displayed, docker compose ps shows both services as Up, and curl returns HTTP/1.1 200 OK. After sudo reboot, the containers restart automatically thanks to restart: unless-stopped. docker system df allows monitoring eMMC usage.
Common errors
- ARM images not found: many SBC tutorials cite
linux/arm64images; here you needamd64— this is precisely the x86 advantage of the board. - eMMC full: 64 GB shared with the OS; purge with
docker system prune -aand move/var/lib/dockerto an M.2 NVMe if installed. - Heat/noise: cooling is active but the fan only starts at the threshold configured in the BIOS (normal behavior, FAQ); limiting container CPUs avoids reaching the threshold.
permission deniedon the Docker socket: you must log out and back in after runningusermod -aG docker.- Power loss during writes: for a non-UPS setup, ensure a compliant power supply (USB-C PD or JST 12 V, automatic switching between the two inputs) or the UPS Hat DFR0682 in HID-UPS mode.
- Active watchdog: if an IT8613E watchdog is armed on the board, suspend it before long updates (documented for Windows Update, same caution applies here).
Other tutorials for this board
Code examples for this board
clignotante.pyPythonbouton.pyPythonservo.pyPythonanalogique.pyPythonrespiration.pyPythonneopixel.pyPython