Created
October 14, 2017 06:13
-
-
Save rav94/13b55d829f6907f9e3c817b3a5b7f604 to your computer and use it in GitHub Desktop.
Systemd Service file for removing Docker dangling images
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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')" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Related systemd timer file - https://gist.github.com/rav94/1dc35b1a2d3512c097a688fab27da3e8