Remix.run Logo
newsoftheday 4 hours ago

The article says to regularly run prune, how regularly? Currently I run the following once per day from cron:

    docker system prune -a -f
    docker volume prune -a -f
wolttam 2 hours ago | parent | next [-]

This would depend entirely on how much churn your system is doing on containers/volumes/images. Once a day sounds really often for most situations.

"Regularly" = when you're running out of space because of a bunch of built up old stuff.

bravetraveler 6 minutes ago | parent [-]

The operation itself is pretty cheap... but the loss of cache and constantly pulling/writing to disk makes this counter-intuitive, IMO. Agree: prune when there's pressure.

Also, be sure anything you rely on/want to keep is bound to a running container. Otherwise pruning [without filtering] might be eager. Notably, the 'system' context includes networks.

arnitdo 4 hours ago | parent | prev [-]

From the docs, you can just run `docker system prune -a --volumes`

Ref: https://docs.docker.com/reference/cli/docker/system/prune/