Skip to content

Instantly share code, notes, and snippets.

@adam12
Created June 3, 2021 18:13
Show Gist options
  • Save adam12/bbfdd3053babe4c7dc98b6f7586446d4 to your computer and use it in GitHub Desktop.
Save adam12/bbfdd3053babe4c7dc98b6f7586446d4 to your computer and use it in GitHub Desktop.
Docker Image Prune systemd service and timer
[Unit]
Description=Docker Image Prune
[Service]
Type=oneshot
ExecStart=/usr/bin/docker image prune -f
WorkingDirectory=/tmp
[Unit]
Description=Docker Image Prune
[Timer]
OnCalendar=daily
Persistent=true
[Install]
WantedBy=timers.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment