Skip to content

Instantly share code, notes, and snippets.

@mewm
Created August 2, 2017 08:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mewm/d102270494da6221c9cc1c1062860e17 to your computer and use it in GitHub Desktop.
Save mewm/d102270494da6221c9cc1c1062860e17 to your computer and use it in GitHub Desktop.
Docker clean log command
#!/bin/bash
rm $(docker inspect $1 | grep -G '"LogPath": "*"' | sed -e 's/.*"LogPath": "//g' | sed -e 's/",//g');
#Invocation:
#$sudo ./docker-logs-clean.sh <container-name>;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment