I installed docker on a Debian 7 machine in the following way
$ echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list $ sudo apt-get update $ curl -sSL https://get.docker.com/ubuntu/ | sudo sh
After that when I first tried creating an Image it failed with the following error
time="2015-06-02T14:26:37-04:00" level=info msg="[8] System error: write /sys/fs/cgroup/docker/01f5670fbee1f6687f58f3a943b1e1bdaec2630197fa4da1b19cc3db7e3d3883/cgroup.procs: no space left on device"
Here is the docker info
Containers: 2 Images: 21 Storage Driver: aufs Root Dir: /var/lib/docker/aufs Backing Filesystem: extfs Dirs: 25 Dirperm1 Supported: true Execution Driver: native-0.2 Kernel Version: 3.16.0-0.bpo.4-amd64 Operating System: Debian GNU/Linux 7 (wheezy) CPUs: 2 Total Memory: 15.7 GiB WARNING: No memory limit support WARNING: No swap limit support
How can I increase the memory? Where are the system configurations stored?
From Kal's suggestions:
When I got rid of all the images and containers it did free some space and the image build ran longer before failing with the same error. So the question is, which space is this referring to and how do I configure it?
If we do not want to find dangling images and remove them one by one, we can use the docker image prune command. This command removes all dangling images. If we also want to remove unused images, we can use the -a flag. The command will return the list of image IDs that were removed and the space that was freed.
You can clean what is unused but you should never remove data manually from /var/lib/docker/volumes and/or /var/lib/docker/overlay2. Manually deleting files under /var/lib/docker can result in data loss. Read the Docker command line reference before running any of these commands.
Stop and remove all containers The following command is convenient if you want to stop/remove all the containers, including the running container. In this command, docker ps -a -q is used to display a list of IDs of all Docker containers, and docker rm is used to delete them.
The current best practice is:
docker system prune
Note the output from this command prior to accepting the consequences:
WARNING! This will remove: - all stopped containers - all networks not used by at least one container - all dangling images - all dangling build cache Are you sure you want to continue? [y/N]
In other words, continuing with this command is permanent. Keep in mind that best practice is to treat stopped containers as ephemeral i.e. you should be designing your work with Docker to not keep these stopped containers around. You may want to consider using the --rm
flag at runtime if you are not actively debugging your containers.
Make sure you read this answer, re: Volumes
You may also be interested in this answer, if docker system prune
does not work for you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With