🛠 Conteneuriser avec Docker sur le PC x86 embarqué

LattePanda 3 Delta (id: lattepanda-3) · avance · Schéma : IMG-lattepanda-3-avance-1-docker.svg — La LattePanda 3 Delta sous Ubuntu exécutant plusieurs conteneurs Docker (web, base de données, MQTT) au-dessus du moteur Docker et du noyau Linux, image eMMC en dessous.

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

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

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials