diff --git a/providers/os/connection/container/image_connection.go b/providers/os/connection/container/image_connection.go index 1dd892085a..120988744f 100644 --- a/providers/os/connection/container/image_connection.go +++ b/providers/os/connection/container/image_connection.go @@ -120,7 +120,13 @@ func NewRegistryImage(id uint32, conf *inventory.Config, asset *inventory.Asset) } conn.Metadata.Labels = labels - asset.Labels = labels + if asset.Labels == nil { + asset.Labels = map[string]string{} + } + + for k, v := range labels { + asset.Labels[k] = v + } return conn, err }