🛠 Héberger des conteneurs Docker et un serveur web sur NVMe

Orange Pi 3B (Rockchip RK3566) · avance · Schéma : IMG-orangepi-3b-avance-3-opi3b-docker-serveur-web.svg — Orange Pi 3B en serveur : conteneurs Docker sur SSD NVMe, service web exposé sur le réseau via Ethernet gigabit

Objectives

Turn the Orange Pi 3B into a small 24/7 server: install Docker (arm64), move image storage onto the NVMe SSD (more durable than microSD), and expose a nginx web server on the network via gigabit Ethernet.

Hardware

Full code

# 1. Docker officiel (arm64) — script get.docker.com ou paquets Debian
sudo apt install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo "deb [arch=arm64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian bookworm stable" | sudo tee /etc/apt/sources.list.d/docker.list
sudo apt update && sudo apt install docker-ce docker-ce-cli containerd.io

# 2. Stockage Docker sur le SSD (si / n'y est pas déjà)
sudo mkdir -p /srv/docker && sudo tee /etc/docker/daemon.json <<'EOF'
{ "data-root": "/srv/docker" }
EOF
sudo systemctl restart docker

# 3. Serveur web + redémarrage automatique
docker run -d --name web --restart unless-stopped -p 80:80 \
  -v /srv/www:/usr/share/nginx/html:ro nginx:alpine
echo '<h1>Orange Pi 3B — RK3566</h1>' | sudo tee /srv/www/index.html

# 4. Vérification
sudo docker ps && curl -s http://localhost/ && ip -br addr

Expected verification

docker ps shows the web container "Up"; curl http://localhost/ returns the page title; from a machine on the network, http://IP-de-la-carte/ displays the page. After sudo reboot, the container restarts on its own (--restart unless-stopped).

Common errors

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials