File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -189,9 +189,15 @@ bool sinsp_container_engine_docker::parse_docker(sinsp_container_manager* manage
189
189
container->m_imageid = imgstr.substr (cpos + 1 );
190
190
}
191
191
192
+ // containers can be spawned using just the imageID as image name,
193
+ // with or without the hash prefix (e.g. sha256:)
192
194
bool no_name = !container->m_imageid .empty () &&
193
195
strncmp (container->m_image .c_str (), container->m_imageid .c_str (),
194
196
MIN (container->m_image .length (), container->m_imageid .length ())) == 0 ;
197
+ no_name |= !imgstr.empty () &&
198
+ strncmp (container->m_image .c_str (), imgstr.c_str (),
199
+ MIN (container->m_image .length (), imgstr.length ())) == 0 ;
200
+
195
201
if (!no_name || !m_query_image_info)
196
202
{
197
203
string hostname, port;
You can’t perform that action at this time.
0 commit comments