refactor: replace deprecated docker-compose with docker compose across repository
This commit is contained in:
@@ -77,7 +77,7 @@ Containers or the entire Docker daemon are killed by the kernel's OOM (Out Of Me
|
||||
- Memory leaks in student code go unchecked
|
||||
|
||||
**How to avoid:**
|
||||
- Always set `mem_limit` in docker-compose for each service
|
||||
- Always set `mem_limit` in docker compose for each service
|
||||
- Use `deploy.resources.limits.memory` in compose file format v3+
|
||||
- Monitor with `docker stats`
|
||||
- Teach students to check container resource usage
|
||||
@@ -107,7 +107,7 @@ Containers run as root by default, creating security vulnerabilities and permiss
|
||||
- Volume permission errors seem "easier" to fix with root
|
||||
|
||||
**How to avoid:**
|
||||
- Always specify `user:` directive in docker-compose or Dockerfile
|
||||
- Always specify `user:` directive in docker compose or Dockerfile
|
||||
- Create non-root users in Dockerfiles
|
||||
- Teach Linux permission basics alongside Docker
|
||||
- Use Docker's user namespaces for advanced labs
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
| Tool | Purpose | Notes |
|
||||
|------|---------|-------|
|
||||
| docker-compose config | Validazione YAML | Esegue check sintassi espandendo variabili |
|
||||
| docker compose config | Validazione YAML | Esegue check sintassi espandendo variabili |
|
||||
| docker network inspect | Debug reti | Mostra container connessi, IP allocation |
|
||||
| docker stats | Monitor risorse | Verifica limiti CPU/memoria in tempo reale |
|
||||
| iptables -L -n -v | Debug firewall | Mostra regole NAT/forward attive |
|
||||
|
||||
@@ -92,7 +92,7 @@ Critical risks include data loss from improper volume configuration, OOM killer
|
||||
|
||||
3. **OOM killer (resource exhaustion)** — Always set `mem_limit` and CPU limits in docker-compose; monitor with `docker stats`; recommend 16GB RAM minimum for host
|
||||
|
||||
4. **Running as root** — Always specify `user:` directive in docker-compose or Dockerfile; teach Linux permission basics alongside Docker; never use `--privileged` flag
|
||||
4. **Running as root** — Always specify `user:` directive in docker compose or Dockerfile; teach Linux permission basics alongside Docker; never use `--privileged` flag
|
||||
|
||||
5. **Port conflicts and binding issues** — Use non-standard ports in examples (5433 instead of 5432); teach students to check port usage; document all port mappings; provide conflict detection scripts
|
||||
|
||||
|
||||
Reference in New Issue
Block a user