Skip to content

visionthex/DockerCleaner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

DockerCleaner

Setting up a Script to Clean Up Docker

Install figlet

sudo apt install figlet
  1. Create Your Script:

    • Open a terminal and create your script file using:
      nano cleanup.sh
  2. Make the Script Executable:

    • Make the script executable by running:
      chmod +x cleanup.sh
  3. Run Your Script:

    • Execute your script with the following command:
      ./cleanup.sh

Optional Setup for a Single Command

  1. Move the Script to a Directory in Your PATH:

    • To run the script using a single command, move it to a directory that is in your system's PATH:
      sudo mv cleanup.sh /usr/local/bin/cleanup
    • Alternatively, you can move it to ~/bin:
      mv cleanup.sh ~/bin/cleanup
  2. Verify and Configure Your PATH:

    • Ensure that the directory where you moved the script is in your PATH. Check your PATH with:
      echo $PATH
    • If ~/bin is not in your PATH, add it by modifying your shell configuration file (e.g., ~/.bashrc, ~/.bash_profile, or ~/.zshrc). Add the following line:
      export PATH="$HOME/bin:$PATH"
    • Reload your shell configuration file to apply the changes:
      source ~/.bashrc
  3. Run Your Script:

    • Now you can run your script simply by typing:
      cleanup

About

Docker cleanup script for busy people.

Topics

Resources

Stars

Watchers

Forks

Languages