implement docker image blacklist

This commit is contained in:
yusing
2025-02-24 06:47:07 +08:00
parent 080c1cee4f
commit b7e9a85be0
4 changed files with 89 additions and 31 deletions

View File

@@ -51,7 +51,7 @@ var DummyContainer = new(Container)
func FromDocker(c *container.Summary, dockerHost string) (res *Container) {
isExplicit := false
helper := containerHelper{c}
helper := containerHelper{Summary: c}
for lbl := range c.Labels {
if strings.HasPrefix(lbl, NSProxy+".") {
isExplicit = true
@@ -63,7 +63,6 @@ func FromDocker(c *container.Summary, dockerHost string) (res *Container) {
DockerHost: dockerHost,
ContainerName: helper.getName(),
ContainerID: c.ID,
ImageName: helper.getImageName(),
Labels: c.Labels,