mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-23 01:08:47 +02:00
container now consider explicit if any proxy label defined
This commit is contained in:
@@ -45,8 +45,14 @@ type (
|
|||||||
var DummyContainer = new(Container)
|
var DummyContainer = new(Container)
|
||||||
|
|
||||||
func FromDocker(c *types.Container, dockerHost string) (res *Container) {
|
func FromDocker(c *types.Container, dockerHost string) (res *Container) {
|
||||||
isExplicit := c.Labels[LabelAliases] != ""
|
isExplicit := false
|
||||||
helper := containerHelper{c}
|
helper := containerHelper{c}
|
||||||
|
for lbl := range c.Labels {
|
||||||
|
if strings.HasPrefix(lbl, NSProxy+".") {
|
||||||
|
isExplicit = true
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
res = &Container{
|
res = &Container{
|
||||||
DockerHost: dockerHost,
|
DockerHost: dockerHost,
|
||||||
ContainerName: helper.getName(),
|
ContainerName: helper.getName(),
|
||||||
|
|||||||
Reference in New Issue
Block a user