Class: Kamal::Cli::Prune
Constant Summary
Constants inherited from Base
Base::AUTOMATIC_DEPLOY_LOCK_MESSAGE, Base::VERBOSITY
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 modify(lock: true) 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 modify(lock: true) do on(KAMAL.hosts) do execute *KAMAL.auditor.record("Pruned containers"), verbosity: :debug execute *KAMAL.prune.app_containers(retain: retain) end end end |