diff --git a/docs/developer/setup/docker.md b/docs/developer/setup/docker.md index 1d39d8c46..d391be53b 100644 --- a/docs/developer/setup/docker.md +++ b/docs/developer/setup/docker.md @@ -329,6 +329,40 @@ instances: rm -rf .state/ ``` +### Container engine + +Your container engine, often Docker or Podman, over time will accumulate state. +This state comes in form of images, networks and containers. Due to the nature +of immutable infrastructure, assets are often replaced with newer generations. + +For images this means that old ones pile up, while new ones are being used with +current containers. + +Delete dangling images regularly. + +```sh +docker image prune +``` + +Delete all unused images, which are not used by any container, regularly. + +```sh +docker image prune -a +``` + +Delete all unused networks regularly. + +```sh +docker network prune +``` + +In case you run into trouble, as a last resort you can always reset the state of +your container engine completely. + +```sh +docker system prune -a +``` + ## Running multiple instances Set up as many different projects as you need. Make sure the