Blame
|
1 | # Maintenance |
||||||
| 2 | ||||||||
| 3 | ## Containers |
|||||||
| 4 | ||||||||
| 5 | Regularly check that containers whose services have either moved or been removed, are not still running |
|||||||
| 6 | ||||||||
| 7 | ```bash |
|||||||
| 8 | # List containers running. |
|||||||
| 9 | docker compose ls |
|||||||
| 10 | # Kill a container that should not still be running. |
|||||||
| 11 | # The <id> is found in the list above. |
|||||||
| 12 | docker kill <id> |
|||||||
| 13 | ``` |
|||||||
| 14 | ||||||||
| 15 | ## Space |
|||||||
| 16 | ||||||||
| 17 | ### Pruning |
|||||||
| 18 | ||||||||
| 19 | > Docker takes a conservative approach to cleaning up unused objects (often referred to as "garbage collection"), such as images, containers, volumes, and networks. These objects **are generally not removed unless you explicitly ask Docker to do so**. This can cause Docker to use extra disk space. For each type of object, Docker provides a prune command. In addition, you can use docker system prune to clean up multiple types of objects at once. |
|||||||
| 20 | ||||||||
| 21 | - [Prune unused Docker objects Docker Docs](https://docs.docker.com/engine/manage-resources/pruning/) |
|||||||