Class: Mrsk::Commands::Prune

Inherits:
Base
  • Object
show all
Defined in:
lib/mrsk/commands/prune.rb

Constant Summary

Constants inherited from Base

Base::MAX_LOG_SIZE

Instance Attribute Summary

Attributes inherited from Base

#config

Instance Method Summary collapse

Methods inherited from Base

#container_id_for, #initialize, #run_over_ssh

Constructor Details

This class inherits a constructor from Mrsk::Commands::Base

Instance Method Details

#containers(until_hours: 3.days.in_hours.to_i) ⇒ Object



9
10
11
# File 'lib/mrsk/commands/prune.rb', line 9

def containers(until_hours: 3.days.in_hours.to_i)
  docker :container, :prune, "--force", "--filter", "label=service=#{config.service}", "--filter", "until=#{until_hours}h"
end

#images(until_hours: 7.days.in_hours.to_i) ⇒ Object



5
6
7
# File 'lib/mrsk/commands/prune.rb', line 5

def images(until_hours: 7.days.in_hours.to_i)
  docker :image, :prune, "--all", "--force", "--filter", "label=service=#{config.service}", "--filter", "until=#{until_hours}h"
end