Skip to content

Instantly share code, notes, and snippets.

@rav94
Created October 14, 2017 06:13
Show Gist options
  • Save rav94/13b55d829f6907f9e3c817b3a5b7f604 to your computer and use it in GitHub Desktop.
Save rav94/13b55d829f6907f9e3c817b3a5b7f604 to your computer and use it in GitHub Desktop.
Systemd Service file for removing Docker dangling images
[Unit]
Description=Removing Docker Dangling Images Cron Service
After=docker.service
Requires=docker.service
[Service]
Type=oneshot
ExecStart=/bin/sh -c "/bin/docker rmi $(docker images --quiet --filter 'dangling=true')"
@rav94
Copy link
Author

rav94 commented Oct 14, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment