Class: Shippy::Cli::Prune
- Inherits:
-
Base
- Object
- Thor
- Base
- Shippy::Cli::Prune
show all
- Defined in:
- lib/shippy/cli/prune.rb
Instance Method Summary
collapse
Methods inherited from Base
exit_on_failure?, #initialize
Instance Method Details
#all ⇒ Object
3
4
5
6
|
# File 'lib/shippy/cli/prune.rb', line 3
def all
containers
images
end
|
#containers ⇒ Object
16
17
18
19
20
|
# File 'lib/shippy/cli/prune.rb', line 16
def containers
on(SHIPPY.host) do
execute :docker, :container, :prune, "--force", "--filter", "until=#{3.days.in_hours}h"
end
end
|
#images ⇒ Object
9
10
11
12
13
|
# File 'lib/shippy/cli/prune.rb', line 9
def images
on(SHIPPY.host) do
execute :docker, :image, :prune, "--all", "--force", "--filter", "until=#{7.days.in_hours}h"
end
end
|