Created
November 23, 2022 17:36
-
-
Save AlperRehaYAZGAN/0cb4bf613de7eb6818d8121b6c4bd5a9 to your computer and use it in GitHub Desktop.
Docker Display every container log size (disk usage)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# disk usage | |
sudo du -h $(docker inspect --format='{{.LogPath}}' $(docker ps -qa)) | |
# truncate logs | |
sudo truncate -s 0 $(docker inspect --format='{{.LogPath}}' CONTID ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment