Cleanup commands
A common case with Docker is the various resources that are created when using it for day-to-day development. Removing images, containers, and also networks and volumes can become redundant. Compose offers a more managed way to deal with all those resources.
down
Let’s run the application in attached mode:
$ docker compose up [+] Running 2/0 Container chapter4-task-manager-1 Running 0.0s Container chapter4-redis-1 Running 0.0s
Once we hit Ctrl + D, we shall escape Compose, the logs will stop being displayed, and the services shall stop running:
Gracefully stopping... (press Ctrl+C again to force) [+] Running 2/2 Container chapter4-task-manager-1 Stopped ...