Docker Community Forums

Share and learn in the Docker community.

The HDD is almost full (prune unreclaimable container)


the hard disk is almost full. As far as I see, there are 170 GB ununsed docker images:

renner@boulder:~$ docker system df
Images          6         6         2.594GB   178.2MB (6%)
Containers      6         6         170.1GB   0B (0%)
Local Volumes   5         5         729.9kB   0B (0%)
Build Cache     0         0         0B        0B

following the instructions i tried various commands:

$ docker image prune -a -f
$docker system prune
$ docker system prune --volumes
$ docker container prune 

But there are still unreclaimable.

$ docker container ls -a

only shows the running containers, only a few.

renner@boulder:~$ docker --version
Docker version 20.10.6, build 370c289

What did I miss?

The output of docker system dfindicates 170GB for containers(!)

Seems like one or more of you containers write data into the containers filesystem.

A common mistake is to write logs into the container filesystem, without any sort of log rotation or log trimming. Typicaly you would either want to send logs to STDOUT and STDERR or directly send them to your log management system, rather then writing logs inside the container filesystem itself.

1 Like

Thanks for your answer. It was indeed a logfile problem. I did not know that hiveMQ is logging in DEBUG level. In a first step I changed it to ERROR. This gives me time to search how to log to STDOUT.