Docker - write no space left on device on when you do have space on disk and your container is over 10G

 When running docker and you see

71d0ffff104f: Extracting [==================================================>] 1.111GB/1.111GB
ERROR: failed to register layer: ApplyLayer exit status 1 stdout: stderr: write /disk/data/application/16384/64139: no space left on device

and you are sure that you have disk space, it is possible that your container is too huge. The default container has 10GB limit basesize.

If you container is over 10GB limit, you could increase the basesize with dm.basesize

Do the following

1) stop docker

 service docker stop

2) create /etc/docker/daemon.json

3) set the following to a mount that is space at /etc/docker/daemon.json

   "data-root": "/path/to/your/docker",

                "storage-driver": "devicemapper", 

                "storage-opts": [

                    "dm.basesize=30G"

                  

}

4) start docker

service docker start

Reference

1. https://docs.docker.com/engine/reference/commandline/dockerd/




Comments

Popular Posts