Class: Kamal::Cli::Prune
Instance Method Summary collapse
Methods inherited from Base
dynamic_command_class, exit_on_failure?, #initialize
Constructor Details
This class inherits a constructor from Kamal::Cli::Base
Instance Method Details
#all ⇒ Object
3 4 5 6 7 8 |
# File 'lib/kamal/cli/prune.rb', line 3 def all with_lock do containers images end end |
#containers ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/kamal/cli/prune.rb', line 23 def containers retain = .fetch(:retain, KAMAL.config.retain_containers) raise "retain must be at least 1" if retain < 1 with_lock do on(KAMAL.hosts) do execute *KAMAL.auditor.record("Pruned containers"), verbosity: :debug execute *KAMAL.prune.app_containers(retain: retain) end end end |