K
K
krlljs2018-07-11 23:40:24
Docker
krlljs, 2018-07-11 23:40:24

Using Docker, accumulated garbage. How to properly clean? Where did the gigabytes go?

I have freepbx installed via docrer image. The host has only 20GB. Every two months you have to clean the system of debris. Otherwise, glitches happen. Asterisk regularly receives calls, but due to the lack of free megabytes, freepbx does not allow access to the control panel. The plans are to write a script, a garbage collector, which once a month will be collected into one archive and uploaded somewhere. However, now I do everything manually. But even after getting rid of the garbage in the container itself, there is still not enough memory.
5b46619f9fd71132510471.png
Mostly call records are accumulated. But even after cleaning, half of the disk is occupied by something incomprehensible. My intrigues led me to the treasured folder. It is where most of the occupied space is concentrated.
5b4663809110b180997673.png
I only have one docker container and image on my system. However, why did it grow to an impressive 9GB?
5b4665a748092637129383.png
Let's take a look at the history of image changes?
5b466e58a3930664673769.png
Images with a tag should only add 500-700Mb. However, we remember that there are 5 gigabytes in the diff folder!
5b466cae6c39a457773107.png
Or
5b466cfba44e7965728900.png
And now the contents of the diff folder
5b4677e0734d3132482696.png
Question: What kind of garbage? Where is he from? How not to accumulate garbage?
PS
I created a separate volume for recording conversations. The data from them should not fall into commits, right?
5b4667ace3e2f272244226.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
krlljs, 2018-07-12
@krlljs

It's all about logs. Once again commented out, in the end
How to avoid?
I am diving into the docker topic, sooner or later I will get closer to the answer. But if suddenly someone has information, do not hesitate to share it. I think the clue lies in the way docker commits are made. Understanding how the commit mechanism works will be half the battle.
PS To understand the essence of what is happening, I suggest reading articles on how Docker works on Habré. Plus, it will also be useful to read Adrian Mowat's book "Using Docker", the book can be purchased in printed form or downloaded in pdf. i like pdf
5b46757829bc8582797098.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question