use attach_with_timeout instead of container.attach