0

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?

Antonio Petricca
  • 8,891
  • 5
  • 36
  • 74
rezshar
  • 570
  • 1
  • 6
  • 20

1 Answers1

1

For a oneshot cleanup you should use:

sudo truncate -s 0 /var/lib/docker/containers/containerid.json.log
Antonio Petricca
  • 8,891
  • 5
  • 36
  • 74