class_docstr: Checks all functions of the DockerEnvironmentDriver
class_docstr_tok: ["Checks","all","functions","of","the","DockerEnvironmentDriver"]
code: def test_run_container(self):
      # TODO: test with all variables provided
      self.docker_environment_driver.build_image(
          self.image_name, self.dockerfile_path
      )
      # With default parameters
      (
          return_code,
          container_id,
      ) = self.docker_environment_driver.run_container(self.image_name)
      assert return_code == 0 and container_id
      # teardown container
      self.docker_environment_driver.stop(container_id, force=True)
      # With api=True, detach=False
      logs = self.docker_environment_driver.run_container(
          self.image_name, api=True
      )
      assert logs == ""
      # With api=True, detach=True
      container_obj = self.docker_environment_driver.run_container(
          self.image_name, api=True, detach=True
      )
      assert container_obj
  
imports: from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import os
  import shutil
  import tempfile
  import platform
  import threading
  import sys
  import uuid
  import timeout_decorator
  from io import open
  from datmo.core.controller.environment.driver.dockerenv import DockerEnvironmentDriver
  from datmo.core.util.exceptions import EnvironmentInitFailed, EnvironmentConnectFailed, FileAlreadyExistsError, EnvironmentRequirementsCreateError, EnvironmentImageNotFound, EnvironmentContainerNotFound, PathDoesNotExist, EnvironmentDoesNotExist, EnvironmentExecutionError
  from datmo.core.util.misc_functions import check_docker_inactive, pytest_docker_environment_failed_instantiation
label_desc: Use image node_id 28 for calling the TestDockerEnv obj's underlying member method code with example usage: obj.test_run_container() without return types