20 lines
		
	
	
		
			622 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
		
		
			
		
	
	
			20 lines
		
	
	
		
			622 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
|  | #!/bin/zsh | ||
|  | DEPENDENCIES+=(docker) | ||
|  | REQUIRED_ENV+=() | ||
|  | 
 | ||
|  | CHECK_ENVIRONMENT | ||
|  | ##################################################################### | ||
|  | 
 | ||
|  | DOCKER_CLEAN() { | ||
|  | 	WARNING 'this will prune all docker resources from the current machine' | ||
|  | 	WARNING 'pruned resources are PERMANENTLY DELETED' | ||
|  | 	yN 'continue?' || return 1 | ||
|  | 
 | ||
|  | 	SUCCESS "CONTAINER : $(docker container prune -f 2>/dev/null | tail -n 1)" | ||
|  | 	SUCCESS "IMAGE     : $(docker image prune -f 2>/dev/null | tail -n 1)" | ||
|  | 	SUCCESS "VOLUME    : $(docker volume prune -f 2>/dev/null | tail -n 1)" | ||
|  | } | ||
|  | 
 | ||
|  | ##################################################################### | ||
|  | DOCKER_CLEAN $@ |