Skip to content

Instantly share code, notes, and snippets.

@timothystewart6
Last active February 24, 2019 23:50
Show Gist options
  • Save timothystewart6/b7fd735eb8ed66cde72624fa74142b07 to your computer and use it in GitHub Desktop.
Save timothystewart6/b7fd735eb8ed66cde72624fa74142b07 to your computer and use it in GitHub Desktop.
Docker cleanup - crontab
#!/bin/bash
docker rmi $(docker images -q -f dangling=true)
# chmod +x ~/docker-cleanup.sh.
# crontab -e
# every day at midnight
# 0 12 * * * ~/docker-cleanup.sh > /dev/null 2>&1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment