lib/cide/cli.rb in cide-0.6.0 vs lib/cide/cli.rb in cide-0.6.1
- old
+ new
@@ -223,11 +223,11 @@
desc: 'Number of days to keep the images',
default: 7,
type: :numeric
method_option 'count',
desc: 'Maximum number of images to keep',
- default: 10,
+ default: 20,
type: :numeric
def clean
setup_docker
days_to_keep = options[:days]
@@ -236,10 +236,10 @@
x = docker('images', '--no-trunc', capture: true)
iter = x.lines.each
iter.next
cide_image_ids = iter
.map { |line| line.split(/\s+/) }
- .select { |line| line[0] =~ %r{^cide/} || line[0] == '<none>' }
+ .select { |line| line[0] =~ %r{^cide[/-]} || line[0] == '<none>' }
.map { |line| line[2] }
if cide_image_ids.empty?
puts 'No images found to be cleaned'
return