fix: more precise filtering

Closes coop-cloud/organising#305.
This commit is contained in:
2022-03-27 12:40:05 +02:00
committed by Gitea
parent 338360096c
commit 6aa23a76a1
10 changed files with 70 additions and 25 deletions

View File

@ -2,6 +2,7 @@ package app
import (
"context"
"fmt"
"strconv"
"strings"
"time"
@ -95,7 +96,8 @@ func checkErrors(c *cli.Context, cl *dockerClient.Client, app config.App) error
for _, service := range recipe.Config.Services {
filters := filters.NewArgs()
filters.Add("name", service.Name)
filters.Add("name", fmt.Sprintf("^%s_%s", app.StackName(), service.Name))
containers, err := cl.ContainerList(context.Background(), types.ContainerListOptions{Filters: filters})
if err != nil {
return err