Check for the length of containers variable

Avoid `panic: runtime error: index out of range` if there is no any running containers