Clearing the Log FileSometimes we run out of disk space on our system, and we notice that the Docker log files are taking up a lot of space. For that, we first need to locate the log files and then delete them. Also, make sure that clearing the log file does not impact the state of the running container.
Below is the command to clear all the log files stored on the host machine:
Notice that the above command will not delete the log file. Instead, it will remove all the content inside the log file. By executing the below command, we can delete the log files associated with a specific container:
https://www.baeldung.com/ops/docker-logs
No hay comentarios:
Publicar un comentario