Skip to content

morlim/dcr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dcr - Docker Cleaner

Overview

dcr is a command-line tool designed to help clean up unused Docker resources, including images, containers, and volumes. It provides an interactive, user-friendly way to free up disk space and manage Docker resources efficiently.

Features

  • List all Docker images, containers, and volumes
  • Remove unused Docker images
  • Remove stopped Docker containers
  • Remove dangling Docker volumes
  • Dry-run mode to preview deletions before execution
  • Interactive confirmation for safe cleanup

Prerequisites

Ensure you have Docker installed on your system. You can download and install Docker from Docker's official website.

Installation

Make sure you have Rust installed. If not, install it using Rustup:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Then, clone the repository and build the project:

git clone https://github.com/yourusername/dcr.git
cd dcr
cargo build --release

For system-wide installation, run:

cargo install --path .

Usage

Run dcr with the available options:

dcr --help

Listing Docker Resources

  • List all Docker resources (images, containers, volumes):
    dcr --list-all
  • List Docker images:
    dcr --list-images
  • List Docker containers:
    dcr --list-containers
  • List Docker volumes:
    dcr --list-volumes

Cleaning Docker Resources

  • Remove unused images:
    dcr --images
  • Remove stopped containers:
    dcr --containers
  • Remove unused volumes:
    dcr --volumes
  • Preview what would be deleted (Dry-run mode):
    dcr --images --dry-run

Development

If you want to contribute or modify dcr, install dependencies and run:

cargo check
cargo fmt
cargo clippy
cargo test

License

This project is licensed under the MIT License. See the LICENSE file for details.

Author

Daniel Morlim


Feel free to contribute by submitting issues or pull requests!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages