docs(developer/setup/docker): add information about container engine lifecycle

This commit is contained in:
jon r 2025-04-04 14:22:10 +02:00
parent 2f9a06910b
commit 1a9dac03b8
1 changed files with 34 additions and 0 deletions

View File

@ -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