Smarter container wait logic during start

Signed-off-by: Maxime Petazzoni <max@signalfuse.com>