How do I fix the no space left on device error in docker

0 votes

I’m trying to run docker but every time I run it, I get the below error:

WARNING: No memory limit support 
WARNING: No swap limit support
Jul 31, 2018 in Docker by Tyrion anex
• 8,700 points

recategorized Nov 13, 2018 by Omkar 12,673 views

2 answers to this question.

0 votes

Just clean up some space on docker, use the following commands:

docker system prune

This will get rid of:

- all stopped containers

- all volumes not used by at least one container

- all networks not used by at least one container

- all dangling images

To clean your system, first remove containers and then the images. By specifying the #CONTAINER_ID and #IMAGE_ID you can remove selected containers and images that are no longer needed.

$ docker rm #CONTAINER_ID
$ docker rmi #IMAGE_ID
answered Aug 1, 2018 by Sophie may
• 10,620 points
0 votes

I had a similar issue, got the solution fron github

add cgroup_enable=memory swapaccount=1 to kernel boot options to enable both swap and memory accounting
/etc/default/grub:

GRUB_CMDLINE_LINUX_DEFAULT="cgroup_enable=memory swapaccount=1"
then sudo grub-update && sudo reboot

Hope that helps :)

answered Apr 30, 2019 by Vishaka
0 votes

Try cleaning up:

$ docker volume rm $(docker volume ls -qf dangling=true)

List dangling volumes:

$ docker volume ls -qf dangling=true

List all volumes:

$ docker volume ls

2 . Also consider removing all the unused Images.

First get rid of the <none> images 

docker rmi $(docker images | grep '^<none>' | awk '{print $3}')

Then if you are using Docker Compose to build Images locally for every project. You will end up with a lot of images usually named like your folder (example if your project folder named sample, you will find images name sample_blablabla). so also consider removing all these images.You could remove them manually with:

docker rmi {image-name}
answered Aug 14, 2019 by Sirajul
• 59,230 points

Related Questions In Docker

0 votes
1 answer

How do I scale in Docker Swarm Mode W/Terraform Digital Ocean Load Balancing

The solution you could build for Digital ...READ MORE

answered Jun 19, 2018 in Docker by shubham
• 7,340 points
1,498 views
0 votes
1 answer

How do I know which datastore indexes are in error?

There was no public API for managing ...READ MORE

answered Jul 27, 2018 in Docker by ajs3033
• 7,300 points
745 views
0 votes
1 answer

How do I install phantomjs with node in docker

Here is what you can try. Link for existing ...READ MORE

answered Aug 1, 2018 in Docker by Damon Salvatore
• 5,980 points
5,816 views
+2 votes
1 answer
+2 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 58,020 points
2,715 views
0 votes
1 answer
0 votes
2 answers
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP