Ignore containers created outside compose

Signed-off-by: Laura Brehm <laurabrehm@hey.com>
This commit is contained in:
Laura Brehm 2023-01-17 12:31:27 +01:00 committed by Nicolas De loof
parent 5a2b7b83cd
commit 82ef998511
2 changed files with 5 additions and 0 deletions

View File

@ -59,6 +59,7 @@ func getDefaultFilters(projectName string, oneOff oneOff, selectedServices ...st
if len(selectedServices) == 1 {
f = append(f, serviceFilter(selectedServices[0]))
}
f = append(f, hasConfigHashLabel())
switch oneOff {
case oneOffOnly:
f = append(f, oneOffFilter(true))

View File

@ -46,3 +46,7 @@ func containerNumberFilter(index int) filters.KeyValuePair {
func hasProjectLabelFilter() filters.KeyValuePair {
return filters.Arg("label", api.ProjectLabel)
}
func hasConfigHashLabel() filters.KeyValuePair {
return filters.Arg("label", api.ConfigHashLabel)
}