8000
Skip to content

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Periodic docker prune

head

The problem

When running a swarm, periodicaly updating service images, each worker node starts to hold stale versions of old images, taking disk space.

Common solution is to run docker prune via cron, but we do not want to configure our workers besides joining to the swarm, aren't we?

So this image is designed for running periodic system clean with zero host configuration.

Swarm

version: '3.6'

services:
  periodic-prune:
    image: f213/periodic-docker-prune:1.1.0
        
    # may be omitted, 05:24 by default
    environment:
      AT: '02:44'

    deploy:
      mode: global
      
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      

Manual

$ docker run -v "/var/run/docker.sock:/var/run/docker.sock" -e AT='17:20' f213/periodic-docker-prune

About

Schedule periodic prune inside your swarm with one line!

Topics

Resources

Stars

7 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages

0