Most often this problem occurred by file corruption.
Here's what I did to repair Docker+containerd:
Stop Docker and containerd:
systemctl stop docker containerd
Cleanup containerd data directory (Docker will regenerate it at startup if needed):
rm -rf /var/lib/containerd/
Find Docker's database files - one of them (most often local-kv.db) corrupted in your system:
find /var/lib/docker -type f -size -5M -name '*.db' | grep -v overlay2
- will output something like:
/var/lib/docker/containerd/daemon/io.containerd.metadata.v1.bolt/meta.db
/var/lib/docker/volumes/metadata.db
/var/lib/docker/network/files/local-kv.db
/var/lib/docker/builder/fscache.db
/var/lib/docker/buildkit/snapshots.db
/var/lib/docker/buildkit/metadata.db
/var/lib/docker/buildkit/cache.db
Simply rename this file to .bak:
mv /var/lib/docker/network/files/local-kv.db{,.bak}
Start Docker:
systemctl start docker
Hope will help someone.
网友评论