Problem
engine/lifecycle.rs down_with_options removes containers but never:
- LIFE-001: Removes non-external networks declared in the compose file. Over time this exhausts the host's network namespace limit.
- LIFE-002: Removes named volumes even when
--volumes (remove_volumes=true) is passed. Named volumes accumulate indefinitely.
Fix
After all containers are removed in down_with_options:
- Iterate
file.networks, skip external, remove each non-external network by its resolved name (ignore 404).
- When
remove_volumes, iterate file.volumes, skip external, remove each non-external volume by its resolved name (ignore 404).
Problem
engine/lifecycle.rsdown_with_optionsremoves containers but never:--volumes(remove_volumes=true) is passed. Named volumes accumulate indefinitely.Fix
After all containers are removed in
down_with_options:file.networks, skip external, remove each non-external network by its resolved name (ignore 404).remove_volumes, iteratefile.volumes, skip external, remove each non-external volume by its resolved name (ignore 404).