Fixes #5570: Detect Docker containers properly in inventories

Ticket: http://www.rudder-project.org/redmine/issues/5570

To be merged in master