From 85561d3e194536304cd64ebc6e451570629fd58f Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Sun, 29 Jul 2018 19:54:28 +0200 Subject: [PATCH] new: adding function ``get_running_containers_for_service``. --- bin/compose | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bin/compose b/bin/compose index efd4495..a242123 100755 --- a/bin/compose +++ b/bin/compose @@ -681,6 +681,13 @@ EOF export -f docker_add_host_declaration +get_running_containers_for_service() { + local service="$1" + + docker ps --filter label="compose.service=$service" --format="{{.ID}}" +} +export -f get_running_containers_for_service + ## ## Internal Process