K
K
ksim_miloff2016-09-27 20:01:00
Ruby on Rails
ksim_miloff, 2016-09-27 20:01:00

Docker eats up all the space given to it. How to stop it?

Hello everyone,
I've been using docker for only a month, and only half of this time on one of the machines, and so it ate my entire root partition. Docker installed according to the manual (i.e. it has root rights), now the "/var/lib/docker/aufs/" folder occupies 7.6GB. It seems to me that this should not be the case.
Now there is such a situation that out of the 30GB allocated for the root partition, 8.5 ate the monga, 7.6 - the docker. There are no questions for monge, this is in two years, and the docker has grown in a month. I, as it were, wanted to demolish and reinstall the entire system, for various reasons, incl. wanted to dockerize (including monga), but I wanted to do it in a month :). Now I understand that the docker also needs to be configured differently.
Unfortunately, I could not find information on how to clean aufs, but I'm afraid to demolish stupidly. Help reconfigure.
Thank you.
A few more details: I use Docker as a dev-development environment, now only one rails project is raised in it. It seems to me that this is all due to the fact that during the execution of "docker-compose build" the "bundle install" command is executed, i.e. each time all the gems are installed again and stored in layers (like it's called layers) of the image. Together, these gems can weigh so much, especially if they are reinstalled each time, without deleting their previous versions.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikolai Turnaviotov, 2016-10-03
@ksim_miloff

sudo docker ps -a
sudo docker images
most likely you have a lot of containers and a lot of images - remove the excess

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question