Skip to content

Commit 82ef998

Browse files
laurazardndeloof
authored andcommitted
Ignore containers created outside compose
Signed-off-by: Laura Brehm <[email protected]>
1 parent 5a2b7b8 commit 82ef998

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

pkg/compose/containers.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ func getDefaultFilters(projectName string, oneOff oneOff, selectedServices ...st
5959
if len(selectedServices) == 1 {
6060
f = append(f, serviceFilter(selectedServices[0]))
6161
}
62+
f = append(f, hasConfigHashLabel())
6263
switch oneOff {
6364
case oneOffOnly:
6465
f = append(f, oneOffFilter(true))

pkg/compose/filters.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,7 @@ func containerNumberFilter(index int) filters.KeyValuePair {
4646
func hasProjectLabelFilter() filters.KeyValuePair {
4747
return filters.Arg("label", api.ProjectLabel)
4848
}
49+
50+
func hasConfigHashLabel() filters.KeyValuePair {
51+
return filters.Arg("label", api.ConfigHashLabel)
52+
}

0 commit comments

Comments
 (0)