If you are trying to docker up and get the following error, you might need to do some cleaning:

Error when allocating new name: Insertion failed because database is full: database or disk is full

If you run docker info you might see that you have run out of disk space. This is critical, for instance, if you are using a small AWS EC2 instance.

The following commands should do the trick.

Delete exited containers:

docker rm -v $(docker ps -a -q -f status=exited)

Remove dangling images:

docker rmi $(docker images -f "dangling=true" -q)

Also, Spotify release this project, "a simple Docker container and image garbage collection script".