mirror of
				https://github.com/docker/docker-bench-security.git
				synced 2025-11-04 02:58:59 +00:00 
			
		
		
		
	inspect requires images
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
This commit is contained in:
		
					parent
					
						
							
								60afd7ec83
							
						
					
				
			
			
				commit
				
					
						125eaf90cd
					
				
			
		
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -8,7 +8,7 @@ check_6_1="6.1  - Avoid image sprawl"
 | 
			
		|||
images=$(docker images -q | sort -u | wc -l | awk '{print $1}')
 | 
			
		||||
active_images=0
 | 
			
		||||
 | 
			
		||||
for c in $(docker inspect -f "{{.Image}}" $(docker ps -qa)); do
 | 
			
		||||
for c in $(docker inspect -f "{{.Image}}" $(docker ps -qa) 2>/dev/null); do
 | 
			
		||||
  if docker images --no-trunc -a | grep "$c" > /dev/null ; then
 | 
			
		||||
    active_images=$(( active_images += 1 ))
 | 
			
		||||
  fi
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue