cli
cli copied to clipboard
"Prune Everything" Perpetuates local-kv.db
docker system prune --volumes
(https://docs.docker.com/config/pruning/#prune-everything) prunes all running processes and docker containers, however /var/lib/docker/network/files/local-kv.db
still exists and is populated on start up of the docker, or docker-compose service. This is running on linux ubuntu 18. The solution for this error was found here (https://stackoverflow.com/questions/46176584/docker-bind-for-0-0-0-04000-failed-port-is-already-allocated). I don't know if I should report this here, but it looks like either a bug, or the description of prune everything probably should mention this in the docs. Thanks.
prune
removes unreferenced/unused resources.
It does not explicitly have anything to do with local-kv.db except that it may remove things from the db that relate too removed resources.
I wouldn't put it past there to be a bug in libnetwork that is not reclaiming port allocations.
However, prune
is meant more like a garbage collector.
If something is still holding the port reference, prune will not clean that up unless the container that was holding the reference is no longer running.
If no such container exists, there is a bug.