Skip to content

Instantly share code, notes, and snippets.

@vovimayhem
Created April 30, 2015 19:50
Show Gist options
  • Save vovimayhem/0ad4ddedb3c521e85b1f to your computer and use it in GitHub Desktop.
Save vovimayhem/0ad4ddedb3c521e85b1f to your computer and use it in GitHub Desktop.
Truncate the fuck those docker logs!
#
function clearDockerContainerLog() {
_dirname=$(sudo ls /var/lib/docker/containers/ | grep $1)
sudo sh -c "cat /dev/null > /var/lib/docker/containers/$_dirname/$_dirname-json.log"
_dirname=""
}
alias clean-docker-log="clearDockerContainerLog"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment