Skip to content

Instantly share code, notes, and snippets.

@shollingsworth
Created May 10, 2023 16:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shollingsworth/856045d8b736cd5ce6fb80003753dbd5 to your computer and use it in GitHub Desktop.
Save shollingsworth/856045d8b736cd5ce6fb80003753dbd5 to your computer and use it in GitHub Desktop.
run through all the commands to prune unused resources in docker
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
# prune stale containers/images
docker image prune -f
# prune stale volumes
docker volume prune -f
# prune stale networks
docker network prune -f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment