By using and ad-hoc command to detect and stop stale containers.
By default stale containers are only detected.
This commit is contained in:
Jacopo
2023-04-11 10:22:03 +02:00
parent f9436d5673
commit 579b4cd9aa
5 changed files with 76 additions and 61 deletions

View File

@@ -97,8 +97,7 @@ class Mrsk::Commands::App < Mrsk::Commands::Base
def list_versions(*docker_args, status: nil)
pipe \
docker(:ps, *filter_args(status: status), *docker_args, "--format", '"{{.Names}}"'),
# Extract SHA from "service-role-dest-SHA"
%(grep -oE "\\-[^-]+$"),
%(grep -oE "\\-[^-]+$"), # Extract SHA from "service-role-dest-SHA"
%(cut -c 2-)
end