Cleaning Pi with Docker Gladys V3 and V4

Hello everyone!

I just noticed some slowness on my pi and watchtower that stops regularly.

I have a Raspbian desktop installed with my two instances of Gladys (V3 and V4) running under Docker.
I’m a bit lost on the areas to check to clean up.
A little help would be welcome to check all this…

pi@raspberrypi:/home $ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        15G   15G     0 100% /
devtmpfs        459M     0  459M   0% /dev
tmpfs           464M     0  464M   0% /dev/shm
tmpfs           464M   30M  434M   7% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           464M     0  464M   0% /sys/fs/cgroup
/dev/mmcblk0p1  253M   53M  200M  21% /boot
tmpfs            93M     0   93M   0% /run/user/1000

Thanks in advance for future help.

I started with
docker system prune -a --volumes

It’s been running for 10 minutes… I’ll keep you posted after my coffee… :stuck_out_tongue:

Edit: long but good…
Total reclaimed space: 6.336GB

I will continue my cleaning process, I will put everything here for future cases.

That’s not a bad point, with watchtower running I wonder if it automatically cleans up old images or not! If not, everyone will quickly end up with a full SD card…

I’ll look into it

On my side, I had to extend my partition on the SD card as it was by default a few GB and was full after about 3 weeks of installation.
I also think the system is growing by leaps and bounds :wink:

It doesn’t clean, you should do that in a cron

I wonder if it wouldn’t be better to do this in Gladys (or in the Docker image), I would like to avoid adding code to the image as it cannot be updated later, whereas the Docker image is updated continuously.

Sure, why not, to be made optional (personally, I don’t want Gladys to manage that on my server)

We can document the cron for those who want the OS to be in control.

Or maybe a button in settings/system like the restart to clean?

The thing about the button is that if you don’t think about it, you’re in the same situation.

I’m trying something by thinking that maybe I’m right on a misunderstanding:

docker run -d \
    --name watchtower \
    -v /var/run/docker.sock:/var/run/docker.sock \
    containrrr/watchtower --cleanup

Couldn’t this launch method work?
See here: Arguments - Watchtower

If it’s cool, it’s an option they must have added, so problem solved for your rpi :grin:

Well spotted! :slight_smile: Perfect that