|
@ -1013,9 +1013,19 @@ export -f docker_add_host_declaration |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
get_running_containers_for_service() { |
|
|
get_running_containers_for_service() { |
|
|
local service="$1" |
|
|
|
|
|
|
|
|
local service="$1" project="$2" |
|
|
|
|
|
|
|
|
|
|
|
project=${project:-$PROJECT_NAME} |
|
|
|
|
|
|
|
|
|
|
|
[ -n "$project" ] || { |
|
|
|
|
|
err "No project name was defined yet." |
|
|
|
|
|
return 1 |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
docker ps --filter label="compose.master-service=$service" --format="{{.ID}}" |
|
|
|
|
|
|
|
|
docker ps \ |
|
|
|
|
|
--filter label="compose.project=$project" \ |
|
|
|
|
|
--filter label="compose.master-service=$service" \ |
|
|
|
|
|
--format="{{.ID}}" |
|
|
} |
|
|
} |
|
|
export -f get_running_containers_for_service |
|
|
export -f get_running_containers_for_service |
|
|
|
|
|
|
|
|