![](https://i0.wp.com/res.cloudinary.com/practicaldev/image/fetch/s--UKj45hsh--/c_imagga_scale,f_auto,fl_progressive,h_500,q_auto,w_1000/https://i.ibb.co/swkd4P2/ccc.jpg?w=1200&ssl=1)
One of the frustrating things about Dokku, is that pushes often report as succesful when they haven’t been. The most obvious example is when it didn’t trigger a build (see last post for more on that). But another one is if you’re out of disk space, and dokku fills up the /var/lib/overlay2 directory with a lot of images. Dokku’s own prune command is very conservative and doesn’t make much of an impact at all. And deleting anything from this directory is an absolute no no.
Freeing up space more effectively can be done with
docker system prune -a
This freed me up 21G of space. But it is going to fill up again pretty soon, so this is best set up as a cron job with the -f flag to stop it requesting for confirmation
Hit crontab -e and add the following
56 10 * * * docker system prune -af
And this should keep your /var/lib/docker/overlay2 folder in check
Discover more from Coursity
Subscribe to get the latest posts sent to your email.