Created
May 8, 2020 02:59
-
-
Save reilee/992561a7e22f0db7322143e9c17fb3bd to your computer and use it in GitHub Desktop.
Truncate docker container log
This file contains 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
export CONTAINER_ID=<container_name_or_id> | |
truncate -s 0 $(docker inspect --format='{{.LogPath}}' ${CONTAINER_ID}) | |
## or | |
echo "" > $(docker inspect --format='{{.LogPath}}' ${CONTAINER_ID}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment