Allowing resize tty to only work when container is started

Fixes #8728

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>