Home > Software design >  How to free up space used by docker containers without docker restart?
How to free up space used by docker containers without docker restart?

Time:04-04

I have a project with docker containers that make a huge logs at /var/lib/docker/containers when /var/lib/docker/containers/containerid.json.log is deleted, the space still not free. for some reasons docker-deamon should not be restarted. if docker-daemon restart or if server rebooted the problem will be solved but I can't do it and the container should be online every time. what should I do?

CodePudding user response:

For a oneshot cleanup you should use:

sudo truncate -s 0 /var/lib/docker/containers/containerid.json.log
  • Related