dockercleanup

command module
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 29, 2023 License: MIT Imports: 8 Imported by: 0

README

Docker Cleanup

CLI utility to cleanup docker images and containers in the background.

Docker usage

Available as a docker image, will access either CLI arguments or environmental variables for configuration.

version: '3.7'

services:
  dockercleanup:
    image: greboid/dockercleanup
    environment:
      DURATION: 24h
    privileged: true
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    restart: always

Basic CLI Usage

This can also be installed and run directly:

go install github.com/greboid/dockercleanup
  dockercleanup --duration [repeat every X duration]

Config Options

You can optionally pass the follow options

--allimages=true to cleanup all images, rather than just dangling images

--containers=true to cleanup non running containers

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL