Merge pull request #254 from basecamp/retain-last-5-containers

Retain a fixed number of containers when pruning
This commit is contained in:
David Heinemeier Hansson
2023-05-02 13:16:49 +02:00
committed by GitHub
4 changed files with 18 additions and 10 deletions

View File

@@ -7,7 +7,7 @@ class Mrsk::Cli::Prune < Mrsk::Cli::Base
end
end
desc "images", "Prune unused images older than 7 days"
desc "images", "Prune dangling images"
def images
with_lock do
on(MRSK.hosts) do
@@ -17,7 +17,7 @@ class Mrsk::Cli::Prune < Mrsk::Cli::Base
end
end
desc "containers", "Prune stopped containers older than 3 days"
desc "containers", "Prune all stopped containers, except the last 5"
def containers
with_lock do
on(MRSK.hosts) do