cli icon indicating copy to clipboard operation
cli copied to clipboard

"Prune Everything" Perpetuates local-kv.db

Open patientplatypus6 opened this issue 3 years ago • 3 comments

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.

patientplatypus6 avatar Jan 13 '21 20:01 patientplatypus6

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.

cpuguy83 avatar Jan 13 '21 21:01 cpuguy83

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.

cpuguy83 avatar Jan 13 '21 21:01 cpuguy83

If no such container exists, there is a bug.

cpuguy83 avatar Jan 13 '21 21:01 cpuguy83