自动摘要
正在生成中……
You can get this error if docker doesn't shut down cleanly. The following answer is for the docker snap package.
Run snap logs docker and look for the following:
Error starting daemon: pid file found, ensure docker is not running or delete /var/snap/docker/179/run/docker.pid
Deleting that file and restarting docker worked for me.
rm /var/snap/docker/<your-version-number>/run/docker.pid
snap stop docker
snap start docker
Make sure to replace <your-version-number> with the appropriate version number.