Error: No Space Left on Device

This error is encountered when your host machine runs out of disk space. Please note that this is not considered a drone bug, but can certainly be a side-effect of a very active build server.

no space left on device

The most common root cause for this error message is that your docker daemon is caching a large number of images and has exhausted disk space. We recommend regularly pruning cached images.

docker images prune

The second most common root causes is that you are using the Docker plugin or dind image with the vfs storage driver. If you are using the vfs driver please be aware of the potential performance implications and disk requirements.

The vfs backend is a very simple fallback that has no copy-on-write support. Each layer is just a separate directory. Creating a new layer based on another layer is done by making a deep copy of the base layer into a new directory.

Since this backend doesn’t share diskspace use between layers, and since creating a new layer is a slow operation this is not a very practical backend. However, it still has its uses, for instance to verify other backends against, or if you need a super robust (if slow) backend that works everywhere.

Automated Tooling

There are tools you can use to automatically purge old and unused images. We recommend running docker-custodian alongside your agent.

version: '2'

services:
  docker-custodian:
    image: yelp/docker-custodian
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    restart: always
    command: [ dcgc, --max-image-age, 30days ]

Note the above configuration is a sample and should be tuned for your environment, with pattern matching configured to prevent pruning commonly used images.

Questions?

We are always happy to help with questions you might have. Search our documentation or check out answers to common questions. You can also post questions or comments to our community forum.

Is there a mistake on this page? Please let us know or edit this page.