mirror of
https://github.com/yusing/godoxy.git
synced 2025-06-01 09:32:35 +02:00
container now consider explicit if any proxy label defined
This commit is contained in:
parent
8aa831804b
commit
eac3afba52
1 changed files with 7 additions and 1 deletions
|
@ -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(),
|
||||
|
|
Loading…
Add table
Reference in a new issue