Class: Mrsk::Commands::Prune
- Inherits:
-
Base
- Object
- Base
- Mrsk::Commands::Prune
show all
- Defined in:
- lib/mrsk/commands/prune.rb
Constant Summary
collapse
- PRUNE_IMAGES_AFTER =
7.days.in_hours.to_i
- PRUNE_CONTAINERS_AFTER =
3.days.in_hours.to_i
Constants inherited
from Base
Base::MAX_LOG_SIZE
Instance Attribute Summary
Attributes inherited from Base
#config
Instance Method Summary
collapse
Methods inherited from Base
#initialize, #run_over_ssh
Instance Method Details
#containers ⇒ Object
12
13
14
15
|
# File 'lib/mrsk/commands/prune.rb', line 12
def containers
docker :image, :prune, "-f", "--filter", "until=#{PRUNE_IMAGES_AFTER}h"
docker :container, :prune, "-f", "--filter", "label=service=#{config.service}", "--filter", "'until=#{PRUNE_CONTAINERS_AFTER}h'"
end
|
#images ⇒ Object
8
9
10
|
# File 'lib/mrsk/commands/prune.rb', line 8
def images
docker :image, :prune, "-f", "--filter", "until=#{PRUNE_IMAGES_AFTER}h"
end
|