Sign inSign up

f213/periodic-docker-prune

By f213

Updated 6 months ago

Image
0

10K+

f213/periodic-docker-prune repository overview

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

Tag summary

Content type

Image

Digest

sha256:8d4b55e10

Size

38.5 MB

Last updated

6 months ago

docker pull f213/periodic-docker-prune