🛠 Docker et conteneurs x86 sur la carte
Objectives
Prove the Alpha's selling point: a true laptop PC ecosystem (the official documentation cites Docker, Visual Studio, and RealSense cameras) within 115 × 78 mm. You will install Docker Engine on Linux, launch a container, mount a volume on the NVMe SSD of the M.2 M-key socket (PCIe 4×), and understand why ARM images from a Raspberry Pi do not run here (and vice versa).
Hardware
- LattePanda Alpha running Linux (Ubuntu; the official documentation covers 16.04, recent versions boot similarly via UEFI — community support)
- Storage: M.2 NVMe SSD strongly recommended (the Alpha 800 has 0 GB onboard; the Alpha 864 has 64 GB of eMMC, which is a bit tight for images)
- 8 GB LPDDR3 RAM — ample for lightweight containers
- Internet connection (Ethernet recommended for large image downloads)
Complete code
# 1. Installer Docker Engine (dépôt officiel Docker)
curl -fsSL https://get.docker.com | sudo sh
sudo usermod -aG docker $USER # puis se reconnecter
# 2. Vérifier l'architecture x86-64 des images
docker version
docker run --rm hello-world
# 3. Conteneur avec volume sur le stockage NVMe
sudo mkdir -p /srv/alpha-data
docker run -d --name webalpha --restart unless-stopped \
-p 8080:80 -v /srv/alpha-data:/usr/share/nginx/html:ro nginx:alpine
# 4. Tester depuis la carte elle-même
echo "<h1>LattePanda Alpha x86</h1>" | sudo tee /srv/alpha-data/index.html
curl -s http://localhost:8080
# 5. Contrôler l'empreinte mémoire/CPU (2 coeurs / 4 threads)
docker stats --no-stream
Expected verification
docker run --rm hello-world displays the success message for the amd64 architecture; curl http://localhost:8080 returns the page served by nginx; docker stats shows the actual footprint on the 2 cores of the m3-7Y30. Since this is standard x86-64, the same images as on a desktop PC run without recompilation.
Common errors
- Trying ARM images (those from the Raspberry Pi): error "image architecture arm does not match" — the Alpha is amd64, you need the x86 variants.
- Running out of storage on the Alpha 864 (64 GB of eMMC shared with the OS): move Docker's data-root to the M.2 SSD.
- Forgetting to log out and back in after
usermod -aG docker:permission denied /var/run/docker.sock. - Overloading the 2 cores with heavy builds: the 4.5 W TDP and passive cooling saturate quickly — prefer lightweight images (alpine, distroless) and monitor the temperature.
Other tutorials for this board
- Faire clignoter une LED sur les broches du coprocesseur
- Bouton poussoir et console série avec le coprocesseur
- Premier script Python sur le PC x86 de la carte
- Pont série SoC ↔ MCU : le tunnel x86 vers ATmega32U4
- Lire un capteur analogique du MCU depuis Python (Firmata)
- Wi-Fi 802.11ac et Bluetooth 4.2 depuis le SoC
Code examples for this board
clignotante.pyPythonbouton.pyPythonservo.pyPythonanalogique.pyPythonrespiration.pyPythonneopixel.pyPython