Skip to content

Instantly share code, notes, and snippets.

@Hendrik44
Created January 18, 2018 10:42
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 Hendrik44/97eb2edd2aea3e244faa54be0a87d6f7 to your computer and use it in GitHub Desktop.
Save Hendrik44/97eb2edd2aea3e244faa54be0a87d6f7 to your computer and use it in GitHub Desktop.
Clear easily the logs from a docker container
#!/bin/bash
rm $(docker inspect $1 | grep -G '"LogPath": "*"' | sed -e 's/.*"LogPath": "//g' | sed -e 's/",//g');
# run this script like this: 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