Skip to content

Commit

Permalink
🐛 Fix platformID for containers
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Zunker <[email protected]>
  • Loading branch information
czunker committed Sep 27, 2023
1 parent c2c4003 commit e640089
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions providers/os/connection/docker_container.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,8 @@ func NewDockerEngineContainer(id uint32, conf *inventory.Config, asset *inventor
conn.PlatformIdentifier = containerid.MondooContainerID(ci.ID)
conn.Metadata.Name = containerid.ShortContainerImageID(ci.ID)
conn.Metadata.Labels = ci.Labels
conn.Asset().Name = ci.Name
asset.Name = ci.Name
asset.PlatformIds = []string{containerid.MondooContainerID(ci.ID)}
return conn, nil
} else {
log.Debug().Msg("found stopped container " + ci.ID)
Expand All @@ -268,7 +269,8 @@ func NewDockerEngineContainer(id uint32, conf *inventory.Config, asset *inventor
conn.PlatformIdentifier = containerid.MondooContainerID(ci.ID)
conn.Metadata.Name = containerid.ShortContainerImageID(ci.ID)
conn.Metadata.Labels = ci.Labels
conn.Asset().Name = ci.Name
asset.Name = ci.Name
asset.PlatformIds = []string{containerid.MondooContainerID(ci.ID)}
return conn, nil
}
}
Expand Down

0 comments on commit e640089

Please sign in to comment.