adding back the image sorting algorithm to ensure proper launch order for dependent containers