Skip to content

Instantly share code, notes, and snippets.

@fenying
Created May 8, 2021 02:47
Show Gist options
  • Save fenying/e2ad94a0f177860de103cff20c96fdbe to your computer and use it in GitHub Desktop.
Save fenying/e2ad94a0f177860de103cff20c96fdbe to your computer and use it in GitHub Desktop.
Clean up all docker container logs
#!/bin/sh
## See https://stackoverflow.com/a/48029079/6559859
for k in $(docker ps --format='{{.ID}}')
do
echo "" > $(docker inspect --format='{{.LogPath}}' $k)
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment