TopicLinux →
⌚ About 2 min read
This BAOI guide provides a structured method for identifying what fills docker without multiplying unnecessary changes.
Avant de commencer : adaptez toujours les commandes et manipulations à votre environnement. Sur un système de production, prévoyez une backup ou un retour arrière lorsque l’action peut modifier la configuration.
Étapes à suivre
-
1
Set perimeter
Identify the equipment, service, affected users and start time.
-
2
Collect Elements
Record the exact messages, logs and useful settings.
-
3
Test methodically
Start with the basic dependencies before the application components.
-
4
Apply correction
Change only the identified parameter or component.
-
5
Validate
Rewrite the full scenario and document the result.
Commands utiles
docker system df.
docker ps -- size
À retenir
- Keep the initial values for a backwards.
- Avoid multiple simultaneous changes.
- Compare with a functional configuration when possible.
Docker: distinguish restart loops from storage-driver growth
Technical checkpoints
- docker ps --no-trunc and docker inspect show exit code, restart policy, mounts and configuration; previous-instance logs remain essential.
- overlay2 can grow due to writable layers, json-file logs and unused images; named volumes are a different data category.
- Restart=always can turn an immediate failure into a loop without fixing the cause.
Docker state
Read size, logs and mounts before any prune.
docker ps -a --no-trunc
docker inspect <container>
docker system df -vTopic-specific pitfalls
- docker system prune -a can remove images required for the next deployment.
- Deleting a volume to gain space can delete persistent application data.
How to validate
- The container remains up across multiple cycles and its exit code/log no longer reproduces the error.
- Disk growth is attributed to a specific layer/log/volume and retention is defined.