🛠 Serveur web léger et conteneurs

Hardkernel ODROID-C2 (Amlogic S905) · avance · Schéma : IMG-odroid-c2-avance-3-odroidc2-serveur-web-conteneurs.svg — ODROID-C2 servant un site nginx et des conteneurs Podman sur son lien Gigabit

Objectives

Turn the ODROID-C2 into the house's little server: a light website behind nginx, containerized execution with Podman (Docker also works on ARMv8 images), leveraging the C2's two hardware assets — real Gigabit Ethernet and the eMMC slot — on its 2 GB of DDR3.

Hardware

Full code

# 1) nginx + site static
sudo apt update && sudo apt install -y nginx
echo '<html><body><h1>Serveur ODROID-C2 (S905, GbE)</h1></body></html>' \
  | sudo tee /var/www/html/index.html
systemctl status nginx --no-pager

# 2) Podman (podman-docker fournit l'alias docker)
sudo apt install -y podman
podman run -d --name whoami --restart always -p 8080:80 \
  --pull=always quay.io/podman-static/whoami 2>/dev/null || \
podman run -d --name test -p 8080:80 nginx:alpine

# 3) memoire : 2 Go partagés — limiter chaque conteneur
podman update --memory 256m test 2>/dev/null || true
free -h

# 4) ecrire peu : logs en RAM (rclone/rsyslog vers le disque par rotation)
sudo sed -i 's#^.*"/var/log/nginx/access.log"#/var/log/nginx/access.log#' /etc/logrotate.d/nginx 2>/dev/null || true

# 5) test depuis un poste : curl http://<ip-du-c2>/ et :8080

Expected verification

curl http://IP/ returns the nginx page, the container answers on 8080. iperf3 toward the board exceeds 600 Mbit/s: the GbE link (RTL8211F) is not the bottleneck, microSD storage would be. free -h shows the footprint under control within the 2 GB.

Common errors

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials