Class: Mrsk::Commands::Prune
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #containers(until_hours: 3.days.in_hours.to_i) ⇒ Object
- #images(until_hours: 7.days.in_hours.to_i) ⇒ Object
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 |