container now consider explicit if any proxy label defined

This commit is contained in:
yusing 2025-01-12 22:31:43 +08:00
parent 8aa831804b
commit eac3afba52

View file

@ -45,8 +45,14 @@ type (
var DummyContainer = new(Container)
func FromDocker(c *types.Container, dockerHost string) (res *Container) {
isExplicit := c.Labels[LabelAliases] != ""
isExplicit := false
helper := containerHelper{c}
for lbl := range c.Labels {
if strings.HasPrefix(lbl, NSProxy+".") {
isExplicit = true
break
}
}
res = &Container{
DockerHost: dockerHost,
ContainerName: helper.getName(),